Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alan Hill 14 posts 57 karma points
    Aug 10, 2015 @ 12:44
    Alan Hill
    0

    RTEs in Archetype lists adding <br> between paragraphs

    Hi,

    Umbraco v7.1.9, Archetype package installed.

    We're building some new templates for a new site design and this is the first time we've used Archetype. We've found that any rich text editor property added within the Archetype collections is getting "br" tags added between P tags that CMS editors enter.

    This hasn't happened before on the non-archetype templates and as a test I also added a test RTE outside an archetype list on one of our new templates and the problem did not appear.

    Despite code searches and debugging I can't find why this is happening. I assumed Archetype must be initializing the tinyMCE editor separately to the main init method in Umbraco, but can't find any Archetype-specific settings that might be causing that.

    In the database rows, the format of the content is:

    <p>whatever content</p>\n<p>whatever content</p>
    

    however when the body text is rendered to the browser the source is:

    <p>...whatever content...</p><br><p>...whatever content...</p>
    

    Anyone seen this or have any ideas?

    I've read something about making the RTE appear in a popout but that is a definite step back for our editors and seems a bit of a hack to get round the issue, so I'd be interested to hear other options.

    An example of my template data structure:

    • random Body Text (RTE)
    • content Collection (archetype)
      • heading text (text)
      • body text (RTE)

    The "random body text" (outside the Archetype) does NOT add the BR tags, whereas the "body text" inside the Archetype collection DOES add the BR tags.

Please Sign in or register to post replies

Write your reply to:

Draft