Editing Rich Text

Some of the fields in a content item may contain rich text (that is, formatted text). A typical textual content item has one such field (often called body) that holds the main content. When you put the cursor in a field that contains rich text, the formatting bar displayed at the top of the content editor (see Formatting Bar) is enabled:

graphics/content-editor-formatting-bar-enabled.png

You can then use the buttons in this bar to format the text you enter. The tools available in the formatting bar may vary from publication to publication.

Internally, the formatted text is stored as XHTML.

Editing the Source XHTML

You can, if you wish, view the source XHTML and/or edit it. To do so:

  1. Right-click somewhere in the formatted field.

  2. Select Edit Source from the displayed menu. The source XHTML is then displayed. An OK and a Cancel button is also displayed at the bottom of the field.

  3. Examine/edit the displayed XHTML.

  4. To save your changes, click on OK, or click on Cancel to cancel any changes you may have made.

This function allows you to Insert or modify XHTML code in ways that the formatting bar does not allow.

If you enter Invalid code while you are using this function, the invalid code is highlighted. You are not allowed to save your changes if the field contains any invalid code: when you click OK, a message asking you to correct the invalid code is displayed.

Pasting XHTML Code

Sometimes you may need to paste in some XHTML code you have copied from some source or other. This is often the means used to embed video clips from other sites (YouTube, for example). You can do this using the Paste HTML function. You can access this function from the Content Studio Edit menu or by right-clicking in an XHTML field. To use it:

  1. Copy the code you need to paste.

  2. Switch to Content Studio.

  3. Put the cursor in the required location inside an XHTML field.

  4. Select the Paste HTML function.