loading table of contents...

7.4.5.4. Customizing the Symbol Mapping

When pasting rich text from Microsoft Word into CoreMedia Studio, some characters of the pasted text might originate from the Word symbol font. CoreMedia Studio translates such characters using a mapping table containing all commonly used characters. However, if your editorial staff uses more obscure symbols, wrong characters may appear after pasting.

To ensure that the characters shown in the rich text area correspond to the symbol character from a Word document, you can define an extension to the symbol mapping. You map each additional character to the HTML entity or the Unicode character in a JavaScript object. Afterwards you can pass that object to the method registerRichTextSymbolMapping of the editor context during the initialization phase of a Studio plugin.

The following code shows how new symbol mappings are registered at startup time.

public function init(editorContext:IEditorContext):void {
  ...
  editorContext.registerRichTextSymbolMapping({
    'Ä': '⊗',
    'Å': '⊕'
  });
  ...
}

Example 7.27. Configuring the rich text symbol mapping