Wednesday, September 2, 2009

Symbols in Rich Text Editor

Question: How can I add en dashes and em dashes to text in the Rich Text Editor?

The escapes for en dash and em dash (– —) are not handled correctly by the RTE when the text is copied back to the field.

You get: – in your text or – if you look at the HTML.

Using the numeric values works correctly: – — but this is tedious.

You can enter these symbols easily by using the Symbols drop down list on the RTE Toolbar.

After doing a little bit of reading on the RTE in SDN, I found how easy it is to add additional symbols to the list. You just need to add your entries to the ToolsFile.xml file which the RTE uses for its settings.

Read more at:

Add your own symbols to ToolsFile.xml:

<symbol value="&#8212;" /> <!-- em dash -->
<symbol value="&#8211;" /> <!-- en dash -->
<symbol value="&#169;" /> <!-- (c) -->
<symbol value="&#174;" /> <!-- (r) -->
<symbol value="&#8482;" /> <!-- tm -->
<symbol value="&#36;" /> <!-- dollar -->
<symbol value="&#8364;" /> <!-- euro -->
<symbol value="&#163;" /> <!-- pound -->
<symbol value="&#165;" /> <!-- yen -->
<symbol value="&#167;" /> <!-- section symbol -->

A good reference for symbol characters: