TinyMce Allow all Html tag

折月煮酒 提交于 2019-11-26 20:07:44

问题


I'm using TinyMce and even though the danger of a script attack, I need to enable all html tags with the editor.

Currently, I'm use like:

valid_elements: "@[class],p[style],h3,h4,h5,h6,a[href|target],strong/b,"
              + "div[align],br,table,tbody,thead,tr,td,ul,ol,li,img[src]"

But always need to add something, I want to enable ALL HTML tags with all attributes. Is there such switch that Disables the HTML filtering?


回答1:


You can set

valid_elements : '*[*]',

to allow all html tags.




回答2:


To keep style tags, use valid_children : "+body[style]"



来源:https://stackoverflow.com/questions/6266487/tinymce-allow-all-html-tag

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