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

Telerik removes the only Paragraph (<p>) Tag

2 Answers 321 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Sohail Sarwar
Top achievements
Rank 1
Sohail Sarwar asked on 19 Apr 2010, 12:36 PM
Hi
 If i write one paragraph of text in the telerik editor and clicks on the return key it puts one p tag around the text and puts another empty p tag as well that we can see in the HTML mode.
 
If i remove the empty p tag in the HTML Mode and switch to design mode the P tag around the text disappears.
i tunred off the ContentFilters by using <ContentFilters>None</ContentFilters>. This fixed the problem i.e. the p tag does not disappear but the contents of the web page does nto display right, some of the <P> tags merged together.

If there are more than more <P> tags the editor works perfect.

Any help will be appreciated. We are using version 5.3.1 MOSS RadEditor with sharepoint.

Kind regards

Sohail

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 19 Apr 2010, 04:12 PM
Hi Sohail,

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 by setting the ContentFilters property to list only the filters that you want excepts the FixEnclosingP filter. After disabling this filter the wrapping P tag will be not stripped by RadEditor, e.g.

You can remove the filters, which you wish to disable:
<property name="ContentFilters">RemoveScripts,MakeUrlsAbsolute,FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent</property>


More information about the ContentFilters is available in the Content Filters help article.


Greetings,
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.
0
Sohail Sarwar
Top achievements
Rank 1
answered on 19 Apr 2010, 04:28 PM
Hi Rumen
                thats fixed the problem. Thanks for your help
Cheers
Sohail
Tags
WebParts for SharePoint
Asked by
Sohail Sarwar
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Sohail Sarwar
Top achievements
Rank 1
Share this question
or