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