joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

Tiny Mce Editor Destroys Structure of Html

Open niosme opened this issue 1 year ago • 1 comments

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/.

niosme avatar May 20 '24 13:05 niosme

  1. This was a bug in tinyMCE 5,x as it was too agressive in sanitizing what it considered to be invalid markup
  2. This was fixed by tinyMCE in 6.x and above
  3. 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

brianteeman avatar May 20 '24 14:05 brianteeman

That's great that its fixed in joomla 5 with tinymce 6 versions and upper.

niosme avatar May 28 '24 07:05 niosme

We are not goimg to update Tiny to version 6 in Joomla4 so this will be a know "Bug"

rdeutz avatar Jun 01 '24 13:06 rdeutz

i am ok with that :)

niosme avatar Jun 03 '24 05:06 niosme