')); } function parseHeader() { // Parse the contents with a DOM parser return new tinymce.html.DomParser({ validate: false, root_name: '#document' }).parse(head); } function setContent(evt) { var startPos, endPos, content = evt.content, headerFragment, styles = '', dom = editor.dom, elm; if (evt.selection) { return; } function low(s) { return s.replace(/<\/?[A-Z]+/g, function(a) { return a.toLowerCase(); }); } // Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate if (evt.format == 'raw' && head) { return; } if (evt.source_view && editor.getParam('fullpage_hide_in_source_view')) { return; } // Parse out head, body and footer content = content.replace(/<(\/?)BODY/gi, '<$1body'); startPos = content.indexOf('
\n