Telerik removes the only Paragraph (<p>) Tag

3 posts, 0 answers
  1. Sohail Sarwar
    Sohail Sarwar avatar
    4 posts
    Member since:
    Apr 2010

    Posted 19 Apr 2010 Link to this post

    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. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 19 Apr 2010 Link to this post

    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.

  3. Sohail Sarwar
    Sohail Sarwar avatar
    4 posts
    Member since:
    Apr 2010

    Posted 19 Apr 2010 Link to this post

    Hi Rumen
                    thats fixed the problem. Thanks for your help
    Cheers
    Sohail
Back to Top