Reputation: 1618
when i add this in my CKEditor it writes it in the database just fine:
<div data-oembed-url="https://www.youtube.com/watch?v=5xAaNCUj0sI">
<div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;"><iframe allow="encrypted-media; accelerometer; gyroscope; picture-in-picture" allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/5xAaNCUj0sI?rel=0" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" tabindex="-1"></iframe></div>
</div>
but when i reloade the backend it opens it like this:
<p> </p>
<div data-oembed-url="https://www.youtube.com/watch?v=5xAaNCUj0sI">
<div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;">
<p> </p>
<iframe allow="encrypted-media; accelerometer; gyroscope; picture-in-picture" allowfullscreen="" scrolling="no" src="https://www.youtube.com/embed/5xAaNCUj0sI?rel=0" style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" tabindex="-1"></iframe>
<p> </p>
</div>
<p> </p>
</div>
<p> </p>
How can i stop CKEditor to add these
to empty divs...
Hope some can help me, thank you!
Upvotes: 0
Views: 241
Reputation: 1618
i found out adding DIV
to:
RTE.default.proc.blockElementList = PRE,UL,OL,H1,H2,H3,H4,H5,H6,ADDRESS,DL,DD,HEADER,SECTION,FOOTER,NAV,ARTICLE,ASIDE,IFRAME,DIV
in the page.ts fixes it.
Upvotes: 0