How to configure TinyMCE to allow block level elements inside an inline element?

I have HTML where there is an inline span element that contains an example div block element . I pasted below the HTML source in the original TinyMCE view and click Ok

<span>plain text<div>test div</div></span>

In addition, I click on the original view and the HTML code that it changes to lower HTML, where the span is automatically closed and the new range is added to the HTML,

<p><span><span>plain text</span></span></p>
<div>test div</div>
<p></p>

I know that we cannot have a block element inside an inline element (i.e. a global HTML rule), but I cannot make changes to the current system.

Update: I tried to mention it here, but it didn’t work well: https://stackoverflow.com/a/4648772

+4

Source: https://habr.com/ru/post/1672001/


All Articles