RadEditor appends <br /> in the editor value

2 posts, 0 answers
  1. Sidhant
    Sidhant avatar
    4 posts
    Member since:
    May 2016

    Posted 02 Jun Link to this post

    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 ?

  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 07 Jun Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top