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

RadEditor - Modifying HTML content

1 Answer 59 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 29 May 2012, 08:13 PM
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?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 30 May 2012, 07:41 AM
Hello,

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,
Rumen
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.
Tags
Editor
Asked by
Nathan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or