+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / p tags disappearing in radetitor

p tags disappearing in radetitor

8 posts, 0 answered
  1. Bart Welch
    Bart Welch avatar
    64 posts
    Registered:
    10 Jul 2009
    19 Jul 2010
    Link to this post
    I have a piece of shared content that is a single paragraph.  Whenever I enclose it within <p></p>, they are removed as soon as I save or view in design view.  Is there a reason why it is removing these html tags.  If I use a second paragraph, it works fine.
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    22 Jul 2010
    Link to this post
    Hi Bart Welch,

    Thank you for using our services.

    Could you please check if the RadEditor has the FixEnclosingP content filter. 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,
    Radoslav Georgiev
    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. Jason M
    Jason M avatar
    108 posts
    Registered:
    15 Jan 2007
    07 Oct 2010
    Link to this post
    I tried editing the ContentFilters property in the pages below:
    Sitefinity\Admin\ControlTemplates\Generic_Content\ControlPanelEdit.ascx
    Sitefinity\Admin\ControlTemplates\Generic_Content\ControlPanelInsert.ascx
    Sitefinity\Admin\ControlTemplates\Generic_Content\EditorTemplate.ascx

    However, FixEnclosingP is still stripping the <p> tags in my pages.  Looks like these filters are in the Telerik.Cms.Engine.dll.  I'm using the default "Generic Content" control from the web.config file (see below).

    <add name="Generic Content" section="Most popular" type="Telerik.Cms.Engine.WebControls.GenericContent, Telerik.Cms.Engine" />

    Am I missing something?
    J
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    08 Oct 2010
    Link to this post
    Hello Jason M,

    Can you please let us know exactly which version of Sitefinity are you using? We need to test this with your version of Sitefinity as we are not able to reproduce this using the latest official release. You can find more on how to check your Sitefinity version here.

    Regards,
    Radoslav Georgiev
    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
  5. Jason M
    Jason M avatar
    108 posts
    Registered:
    15 Jan 2007
    08 Oct 2010
    Link to this post
    We're using Sitefinity 3.7 SP3 with .NET 3.5.

    J
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    11 Oct 2010
    Link to this post
    Hello Jason M,

    Thank you for getting back to me.

    In versions of Sitefinity after 3.6 you have to download the external templates archive for your version of Sitefinity and map the control templates. For your version of Sitefinity the control templates are:
    ~/Sitefinity/Admin/ControlTemplates/Generic_Content/ContentItemNewView.ascx
    ~/Sitefinity/Admin/ControlTemplates/Generic_Content/ContentItemEditView.ascx
    ~/Sitefinity/Admin/ControlTemplates/Generic_Content/GenericContentDesigner.ascx

    Kind regards,
    Radoslav Georgiev
    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
  7. Mike Sharp
    Mike Sharp avatar
    3 posts
    Registered:
    27 May 2009
    22 Oct 2010
    Link to this post
    Is there no way to do this globally?  I'd hate to have to edit every single editor control in the site.  :)

    In the RadEditor for MOSS there is a config file where you can add these filters, and then remove whichever one you wanted:

    <property name="ContentFilters">RemoveScripts,MakeUrlsAbsolute,FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent,ConvertCharactersToEntities</property>

    Is this available in SF 3.7 SP3?

    Regards,
    Mike Sharp
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Oct 2010
    Link to this post
    Hello Mike,

    You can change control properties only per instance. You can globally set only some tools through EditorToolsFile.xml inside Sitefinity/Admin/ControlTemplates folder.

    Kind regards,
    Ivan Dimitrov
    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
Register for webinar
8 posts, 0 answered