module-wysiwyg-advanced
module-wysiwyg-advanced copied to clipboard
Configure to not remove i elements or modify them to em when using for icons e.g. css classes are present.
The i tag is used for icons in the front end WeltPixel Pearl theme for example.

Test
<i class="footer-icon icon-line-clock"></i>
Test
Click show editor. Click hide editor.

The html is modified the i tag was removed as part of cleanup because it is "empty".
<p>Test Test</p>
Their theme installs sample data to modify which includes a lot of various tags, which all get wiped when editing.
You can work around it by using an html comment inside the i tag, which works but then the i tag is changed to an em tag. Seems to still work but weird behavior.
Related: https://github.com/magento/magento2/issues/21602 https://github.com/tinymce/tinymce/issues/2689#issuecomment-391686340
Additionally, when in WYSIWYG edit, no icon shows but I think that is because admin does not load child theme css. Any workaround for this?
Is there a hook or way to modify the Tiny MCE to not remove such tags?
Thanks