Joomla TinyMCE deletes empty span

穿精又带淫゛_ 提交于 2019-12-24 15:16:18

问题


I want to use following tag

<h4><span class="icon-phone"></span></h4>

but TinyMCE from Joomla always deletes it, when i save it.

I find the solution that i have to add span[*] to "Extended Valid Elements" in Options from TinyMCE in PluginManager. but it doesn't work. It always delete it again and again. I searched here for a while and found some articles which was similar to my problem but doesn't solve it.

I use Joomla Version 3.3.6 and the plugin is 4.1.2.

Hope somebody can help.

Best Regards, Dennis


回答1:


Welcome to TinyMCE, my most hated editor ever.

I've had the same problem multiple times and I believe it's because the editor expects content within the element. So try the following:

<h4><span class="icon-phone">&nbsp;</span></h4>

&nbsp; is simply a non breaking space




回答2:


go to: Joomla! administration - Extensions - Plugins - edit Editor - TinyMCE

Set the following parameter: Extended Valid Elements: span[class|style]

This works for me in Joomla! 3.5 (plugin version 4.3.3)



来源:https://stackoverflow.com/questions/26684308/joomla-tinymce-deletes-empty-span

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!