TinyMCE: How to disable code rewriting?

送分小仙女□ 提交于 2019-12-10 16:56:41

问题


I'm trying to prevent TinyMCE (in Joomla) from rewriting code (adding, removing, moving tags and attributes, etc). I don't want to setup every tag, just simply stop TinyMCE from changing my code.

The TinyMCE configuration:

verify_html:false;

doesn't work for me and toggling to the source code view or clicking show/hide still causes the editor to modify my source code.


回答1:


Go into the configuration of the tinyMCE plugin in Joomla and disable the code cleanup.




回答2:


Go to: extensions (Should be on the top tab control)

Click: Plug-in Manager

This will take you to a list of all of Joomla's plugins... Disable any plugins that start with "-editor"

This should leave you with a bare bones editor which edits and saves basic text for Html without regard for what's in it. It's not pretty but if you found half as many bugs in Joomla's editor as I did, you'll be glad of the change.




回答3:


Additional to Hackwars answer: There is a file called tinymce.php holding the tinymce configuration. In this file you can change all necessary settings.

To disable the cleanup functionality you need to set

cleanup: false,



回答4:


Joomla 2.5 (and 3.0) Solution:

Login to your administration and go to Site > Global Configuration > Text Filters.

You can see that any input will have some joomla-side filters (regardless of what editor you use).

At that place you can easily change text filtering for any User Group.

Now Change Default Blacklist to No filtering for Super Users group.

More info at http://docs.joomla.org/Help30:Site_Global_Configuration#Text_Filters



来源:https://stackoverflow.com/questions/7518351/tinymce-how-to-disable-code-rewriting

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