This is a migrated thread and some comments may be shown as answers.

Insert symbols popup

3 Answers 184 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 02 Oct 2010, 10:33 AM
The RadEditor supports a rudimentary insert special symbol popup, and I know it's possible to edit the symbols in the ToolsFile.xml.  However, I need to be able to enter most unicode characters.  I'm looking for something more like the attached popup from MS Word's insert special character dialog box (see attachment).

These are the problems I am having with the built-in insert special in RadEditor:

1) The insert symbol menu gives you a popup that is only 8 characters wide
2) There is no provision to scroll through many many symbols or to organize them into logical groups
3) I have to manually edit the ToolsFile.xml to create the symbols, there are thousands of them!
4) and (perhaps the most important), the symbol that gets inserted is the actual numeric code for the characters and this can break the html.  What is needed is the ability to insert the symbol as html markup as in like:  
&#nnnn;

So, what I'm wondering, is there a widget or plug-in out there that handles special characters better than the built-in omega insert symbol menu?  Would it be difficult to build something better?



3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 07 Oct 2010, 08:40 AM
Hi Michael,

RadEditor does not offer an advanced InsertSymbol dialog out of the box. However, you can create and register a custom dialog to the editor to fulfill the requirements. You can find more detailed information on how to register a custom dialog in the following article:
Add Custom Dialogs

Regarding the specific problems:
1) and 2) you can set size to the popup element of the InsertSymbol tool by setting its popupwidth and popupheight properties. More information on the subject is available in this help article.
3) you can dynamically add symbols to the RadEditor by populating its Symbols collection, e.g.:
RadEditor1.EnsureToolsFileLoaded();
RadEditor1.Symbols.Add(new EditorSymbol('\x223'));
4)I am not quite sure I understand this issue. By default, InsertSymbol tool inserts the character's entity (¾). Could you please, provide more detailed information regarding this issue?

Greetings,
Dobromir
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Michael
Top achievements
Rank 1
answered on 07 Oct 2010, 10:47 AM
Thank you for your response!  

With respect to #4, let me explain.  It's actually a little more complex than I originally said above.  It works for some things but not others.

For example, if I put a euro symbol and a hebrew aleph letter in the tools.xml as follows:

<symbol value="&#8364;" />
<symbol value="&#1488;" />

The RadEditor correctly displays these characters in the insert special symbol drop down and inserts them into the editor window as well.  However, what gets returned is quite different.  The euro symbol gets converted to:
&euro;

but the aleph becomes simply a '?'.

Probably what I would expect for the aleph (and other characters that it can't find an html special character name) would be to leave it in the ampersand format.

Michael
0
Rumen
Telerik team
answered on 07 Oct 2010, 04:09 PM
Hello Michael,

The euro symbol is converted to &euro; entity by the ConvertCharactersToEntities filter of RadEditor. The aleph א symbol is not part of the list of HTML symbols of this filter and it is not transformed to entity on submit. You can do that by writing your own custom content filter using as a base the code in this KB article: Converting Unicode symbols to numeric HTML entities using a content filter.

Additionally, the conversion of the aleph א symbol to ? is an encoding problem on your side. Please, see this article for more information on the matter: Appearance Of Odd Characters After Saving Radeditor's Content In Database.

All the best,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Michael
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Michael
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or