Tiny Mce Editor Destroys Structure of Html
Steps to reproduce the issue
<a href="google.com">
<div>aasdasd</div>
<span class="test">test</span>
</a>
Expected result
<a href="google.com">
<div>aasdasd</div>
<span class="test">test</span>
</a>
Actual result
<div>aasdasd</div>
<p><a href="google.com"><span class="test">test</span> </a></p>
System information (as much as possible)
Joomla 4.4.3
Additional comments
I also installed Dionysopoulos plugin for custom config and passed inside { "valid_elements": "[]", "verify_html": false } but nothing works. it keeps destroying the content. In tiny mce editor online this doesnt happen even on basic example https://www.tiny.cloud/docs/tinymce/latest/basic-example/.
- This was a bug in tinyMCE 5,x as it was too agressive in sanitizing what it considered to be invalid markup
- This was fixed by tinyMCE in 6.x and above
- The demo you linked to is tinyMCE 7.x hence it works
Joomla 4.x ships with tinymce 5 only. Joomla 5.x ships wiith tinymce 6 where the bug you have encountered is not present
That's great that its fixed in joomla 5 with tinymce 6 versions and upper.
We are not goimg to update Tiny to version 6 in Joomla4 so this will be a know "Bug"
i am ok with that :)