Copied to clipboard

Flag this post as spam?

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


  • Tobbe 81 posts 387 karma points c-trib
    Jan 04, 2016 @ 07:48
    Tobbe
    0

    Inline macro in RTE is splitting up content

    I've made a macro with 2 parameters: mm and inches. A user should be able to add this macro inline in a RTE, and then set a property on an ancestors node whether to use mm or inches.

    Everything works fine when I first add the macro to the RTE. But after I've clicked save, Umbraco (tinyMCE?) splits the content of the RTE from:

    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    

    into this:

    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud </p>
    <div class="umb-macro-holder mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="Length" lengthMm="12" lengthInches="21" /> --> <ins>Macro alias: <strong>Length</strong></ins></div>
    <p> exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<p>
    

    That sucks. Because the macro is no longer inline.

    Is there anyway to prevent this behaviour? I've tried to set forced_root_block to nothing in tinyMceConfig.config, but it doesnt solve the problem, since the content is still split up.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 04, 2016 @ 08:06
    Jan Skovgaard
    0

    Hi Tobbe

    Is it related to the issue Blake describes here? https://our.umbraco.org/forum/ourumb-dev-forum/bugs/73655-umbraco-textarea-parameters-with-line-break-disappear-in-editor#comment-73655

    Then it's a known bug unfortunately - It's been reported here http://issues.umbraco.org/issue/U4-7462 with a PR awaiting merge into 7.4.0 - But I guess you should be able to use the PR in your current instance too.

    Hope this helps.

    /Jan

  • Tobbe 81 posts 387 karma points c-trib
    Jan 04, 2016 @ 09:45
    Tobbe
    0

    Hey Jan!

    Thanks for the suggestion. But unfortunately, the issues are not related

  • Declan Cook 2 posts 22 karma points
    Aug 15, 2016 @ 13:45
    Declan Cook
    0

    Hey,

    Did you ever find a solution to this problem?

    Thanks

  • Tobbe 81 posts 387 karma points c-trib
    Aug 15, 2016 @ 13:48
    Tobbe
    0

    nope :(

Please Sign in or register to post replies

Write your reply to:

Draft