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.
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.
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:
into this:
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.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
Hey Jan!
Thanks for the suggestion. But unfortunately, the issues are not related
Hey,
Did you ever find a solution to this problem?
Thanks
nope :(
is working on a reply...