Changes by Marius Dumitru Florea on 30/Jul/24 11:08
Documentation in Release Notes:
N/A
Documentation:
N/A
Assignee:
Marius Dumitru Florea
Resolution:
Invalid
Status:
OpenClosed
1 comment
Marius Dumitru Florea on 30/Jul/24 11:08
When using the HTML macro with clean=false you are responsible for producing valid HTML. The WYSIWYG editor expects valid HTML as input. If it receives invalid HTML it tries to fix it by moving DOM nodes around, adding new nodes, splitting existing nodes, etc. which can easily break the macro marker comments used to delimit and protect the macro output which is not editable.
You don't need the Velocity macro. This is enough:
The HTML is invalid because you generate inline elements at top level, and the editor fixes this by adding a paragraph wrapper, which breaks the macro marker comments.
When using:
{{html}}
<iframe></iframe>
{{/html}}
The rendering adds the paragraph wrapper on the server side, without breaking the macro marker comments.
If you need to use clean=false then you need to add the block wrapper yourself: