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

RadEditor appends <br /> in the editor value

1 Answer 67 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sidhant
Top achievements
Rank 1
Sidhant asked on 02 Jun 2016, 01:35 PM

While using radEditor, If we try to get the value of the editor using "get_html()" function, <br /> tag gets appended in the end if the radEditor is empty.
I tried using "get_html(true)" function. In this case ,<br /> is not appended at the end but the trailing space gets truncated.

How should I fetch the value from RadEditor so that <br /> is not appended at the end and also the trailing space is not truncated ?

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 07 Jun 2016, 10:04 AM
Hi Sidhant,

Trailing white spaces are truncated by the browser as calling get_html(true) triggers DOM operation over the content. However, I can only make guesses how the truncated white spaces can cause issues. 

There is no configurable option to prevent truncated white spaces and remove the BR tag. Mostly because the two behaviors are not related. 

Therefore, you can continue using get_html() and additionally use Regex (or other option) to strip teh last BR  tag.
  
Regards,
Ianko
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Editor
Asked by
Sidhant
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or