close

Filter

loading table of contents...

Studio User Manual / Version 2401

Table Of Contents

3.7 Editing Rich Text Source Code

The CoreMedia rich text field allows you to edit the XML representation of rich text content. By default, this feature is activated for administrative users. If the feature is active, you find a new button in the rich text toolbar. The XML follows the schema defined in coremedia-richtext-1.0.dtd.

Enabling source code editing

Figure 3.41. Enabling source code editing


Caution

Caution

When editing raw rich text XML you need to take care providing valid CoreMedia Rich Text 1.0, as otherwise you may lose data. If in doubt, ensure to check in contents before editing them.

There are some subtle differences between CoreMedia Rich Text 1.0 depicted in Studio and on the server. Especially linked contents.

<?xml version="1.0" encoding="utf-8"?>
<div xmlns="http://www.coremedia.com/2003/richtext-1.0"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <p class="p--heading-2">
    CKEditor 5 Source Editing
  </p>
  <p>
    CKEditor 5 Source Editing feature provides [...]
    to edit
    <a xlink:href="content/22990">
      CoreMedia Rich Text
    </a>
    [...]
  </p>
  <p>
    <img alt=""
         xlink:href="content/6622#properties.data"
    />
  </p>
</div>

Example 3.1. CoreMedia Richtext 1.0 in Studio


<?xml version="1.0" encoding="utf-8"?>
<div xmlns="http://www.coremedia.com/2003/richtext-1.0"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <p class="p--heading-2">
    CKEditor 5 Source Editing
  </p>
  <p>
    CKEditor 5 Source Editing feature provides [...]
    to edit
    <a xlink:href="coremedia:///cap/content/22990">
      CoreMedia Rich Text
    </a>
    [...]
  </p>
  <p>
    <img alt=""
         xlink:href="coremedia:///cap/blob/content/6622#data"
    />
  </p>
</div>

Example 3.2. CoreMedia Richtext 1.0 on Server


Example 3.1, “CoreMedia Richtext 1.0 in Studio” shows a representation that will open as soon as you activate source editing. As you may notice, URIs to content and BLOBs look different from what you may know from Unified API. You may expect rather a representation as shown in Example 3.2, “CoreMedia Richtext 1.0 on Server”.

While you will always see links as so-called CoreMedia Studio URI paths, you are free to enter links in their Unified API representation. Just note, that next time you open source editing, you will see the URI path instead.

There are also some differences between standard rich text editing and editing the raw XML code.

  • Autosave: Auto save isn't active while editing source code. The changes will be stored as soon as you switch back to the standard editing view.

  • Undo: There is no undo during raw XML editing. However, when you switch back to standard rich text editing, the changes you have done are stored as an extra undo step. So, you can always undo what you have changed before in source editing.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.