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

ZWSP inserted into html in chrome

1 Answer 150 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 07 May 2013, 03:59 PM
for v2013.1.220.40

While using the RadEditor in Chrome, a zero width space (​) is inserted under some circumstances. For example, starting with a blank editor, if you click into the editor, change the font size, click back into the editor and type "test", a zwsp is inserted between the end of the font tag and "test". The problem is when the content is saved to the database, it is saved as a question mark, which is far from ideal. I do not experience this behavior in IE. 

Is there a way to prevent the insertion of the zwsp character?

1 Answer, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 10 May 2013, 01:26 PM
Hello David,

The zero-width space symbol is used in the Editor in order to work around browser issues in the Chrome browser concerning the selection of empty nodes. That is the reason why the ZWSP is used when using the font size with an empty selection.
There is a way to work around this issue. You can create a custom filter to remove the ZWSP. Here is a demo that shows how to use custom filters - http://demos.telerik.com/aspnet-ajax/editor/examples/contentfilters/defaultcs.aspx. Your filter will traverse all the nodes in the content area and will replace all occurrences of the zero-width space char.

Hope this helps.

Greetings,
Niko
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Dave
Top achievements
Rank 1
Answers by
Niko
Telerik team
Share this question
or