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

Remove new line char while paste data into editor

1 Answer 177 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Priya Ekbote
Top achievements
Rank 1
Priya Ekbote asked on 01 Oct 2010, 02:58 PM

Hi,


We have following query on Rad editor

 

When data is get copied from notepad into telerik editor, line break by “br” (<br />) tag get added. Also new line char. (\r\n) present in editor content.

Is there any way to keep only “br” or new line char. (\r\n), when data is being copied to editor design mode from notepad?

  

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Oct 2010, 04:18 PM
Hello Priya,

The (\r\n) characters are not rendered in HTML and you can strip them only when submitting the content on the server, e.g.

RadEditor1.Content.Replace("\r", "").Replace("\n", "");

or

RadEditor1.Content.Trim();


Greetings,
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
Priya Ekbote
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or