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

[Solved] Problem with unwanted paragrpahs

1 Answer 51 Views
Editor
This is a migrated thread and some comments may be shown as answers.
TSP Kiran
Top achievements
Rank 1
TSP Kiran asked on 08 Sep 2009, 09:13 AM
Hi Telerik,

When i paste the following text 

<p class="MsoBodyText">
<h3>Sample Text</h3>
</p>

in the "HTML" view of the telerik rad editor, switch the view to "Design" and back to "HTML" again, the text is changed to :

<p class="MsoBodyText">&nbsp;</p>
<h3>Sample Text</h3>
<p>&nbsp;</p>

Is there a property that i can set, which will stop telerik editor (RadControls for ASPNET AJAX Q1 2009) from changing my original text?

Regards
Kiran...

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 11 Sep 2009, 05:58 AM
Hi TSP Kiran,

The observed behavior is due to the Rich Text Editing engine of Internet Explorer that RadEditor uses. It is not valid to have a heading tag inside a paragraph and the browser automatically validates the non well formed HTML. You can reproduce the same behavior in our competitors' editors as well as in the standard editable IFRAME and DIV elements. For your convenience I have attached a sample HTML page with editable IFRAME in it. You can test and you will reproduce the same behavior as in RadEditor.

This validation is entirely controlled by the browser it is not possible to prevent it with code.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
TSP Kiran
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or