RadEditor adding &nbsp when adding space after a link

1 Answer 246 Views
Editor
Philippe
Top achievements
Rank 1
Philippe asked on 17 May 2021, 05:02 PM

When inserting links, if you add a space after the element it will add a &nbsp instead of just white space.

For example, using the demo, if you type in "this is atest" and you insert a link by highlighting "a", and then add a space before test it will look like the following:

this <a href="http://www.google.com">is a</a>&nbsp;test

Is this expected behavior?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 18 May 2021, 07:12 AM

Hi Philippe,

The content area of RadEditor is an editable iframe/div which uses the underlying rich text editing engine of the browser to render the content. The reported behavior is a browser one and it can be reproduced with a standard editable div element as in the following dojo sample: http://dojo.telerik.com/@nlazarov/IFIPAR

For your convenience, I recorded a short video demonstrating the browser behavior - http://youtu.be/J5HDbgqtwfc?hd=1.

You can use string.Replace on the server if you'd like after obtaining the content from RadEditor1.Content to replace the &nbsp; entity with an empty space (String.Empty).

Regards,
Rumen
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Editor
Asked by
Philippe
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or