admin管理员组文章数量:1414923
I'm using a Javascript function to get the content of an HTML file hosted on my server, and then add the content to a TinyMCE editor.
this is the function :
function LoadTemplate(url) {
$.post(url, function (data) {
// Get the editor instance that we want to interact with.
var ed = tinyMCE.get('html_editor');
;
// Insert the response into TinyMCE editor
ed.setContent(data, {format : 'raw'});
// Hide The Templates Div
HideTemplates();
}, "text");
}
After the user select a file, and click Load template, the HTML file is inserted into the TinyMCE editor without any problem, but After clicking submit, I found in the database the head of the document, and the CSS in style tag removed by TinyMCE.
I added to TinyMCE General options :
element_format : "html",
verify_html : false,
but I still get the same error
I'm using a Javascript function to get the content of an HTML file hosted on my server, and then add the content to a TinyMCE editor.
this is the function :
function LoadTemplate(url) {
$.post(url, function (data) {
// Get the editor instance that we want to interact with.
var ed = tinyMCE.get('html_editor');
;
// Insert the response into TinyMCE editor
ed.setContent(data, {format : 'raw'});
// Hide The Templates Div
HideTemplates();
}, "text");
}
After the user select a file, and click Load template, the HTML file is inserted into the TinyMCE editor without any problem, but After clicking submit, I found in the database the head of the document, and the CSS in style tag removed by TinyMCE.
I added to TinyMCE General options :
element_format : "html",
verify_html : false,
but I still get the same error
Share Improve this question asked Feb 16, 2012 at 20:41 HamzaHamza 1,0854 gold badges21 silver badges47 bronze badges1 Answer
Reset to default 5By default TinyMCE is only interested in your page's content which is contained within the document's <body>
part. If you want to have TinyMCE edit every part of your document, especially the <head>
section, then you'll need the fullpage plugin.
http://www.tinymce./wiki.php/Plugin:fullpage
本文标签: phpTinyMCE remove CSS from my HTML codeStack Overflow
版权声明:本文标题:php - TinyMCE remove CSS from my HTML code - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745172468a2646059.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论