If I add some text into the HTML editor of the Editor web part like this:
<p>some text</p>
Then switch to the design view and back again, the <p> tags get stripped from the content.
Is this by design?
Thanks
2 Answers, 1 is accepted
0
Rumen
Telerik team
answered on 18 Oct 2010, 03:55 PM
Hi David,
By default, Internet Explorer wraps the content inside a paragraph tag - this is the default root <p> tag. If this tag is missing the browser automatically adds it. We got many request however to change this behavior, because it was 'tricking" the validators to believe that there is content in the editor. Secondly it was spoiling the layout of page because the content loaded in the editor without the paragraph would be returned surrounded by a paragraph.
That's why we decided to change this by implementing the FixEnclosingP content filter which removes this root paragraph. If you need this paragraph tag then just simply disable this filter using the DisableFilter server method of RadEditor or the ContentFilters property. After disabling this filter the wrapping P tag will be not stripped by RadEditor.
Please, note that if you have more than one paragraphs in the content area:
<p>line1</p>
<p>line2</p>
<p>line3</p>
then the FixEnclosingP filter will not strip them.
Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items