RadEditor - Modifying HTML content

2 posts, 0 answers
  1. Nathan
    Nathan avatar
    1 posts
    Member since:
    Sep 2011

    Posted 29 May 2012 Link to this post

    I'm setting the Content property of my RadEditor in my code behind. I am then grabbing the content client side via get_html(). The content i set in the code behind is different than the content i pull with get_html().

    It seems that the attributes of my html elements are getting reordered.

    So, this:

    <div class='foo' style='bar' />

    Turns into this:

    <div style='bar' class='foo' />

    Why is this happening? Is there a way to stop the control from messing with my html?
  2. Rumen
    Rumen avatar
    14417 posts

    Posted 30 May 2012 Link to this post


    The content area of RadEditor is editable IFRAME, which uses the underlining Rich Text Editing engine of the browser where it operates. The observed behavior is browser behavior and it is the browser that rearranges the attributes in the HTML tags. You can reproduce the same behavior in the attached HTML page having an editable IFRAME elements in it as well as in our competitors' editors.

    Here is a video demonstration: http://screencast.com/t/wZHr4wK9.

    Best regards,
    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.
Back to Top