')); }; var $_5iey4vc3jkmcduub = { parseHeader: parseHeader, htmlToData: htmlToData, dataToHtml: dataToHtml }; var open = function (editor, headState) { var data = $_5iey4vc3jkmcduub.htmlToData(editor, headState.get()); editor.windowManager.open({ title: 'Document properties', data: data, defaults: { type: 'textbox', size: 40 }, body: [ { name: 'title', label: 'Title' }, { name: 'keywords', label: 'Keywords' }, { name: 'description', label: 'Description' }, { name: 'robots', label: 'Robots' }, { name: 'author', label: 'Author' }, { name: 'docencoding', label: 'Encoding' } ], onSubmit: function (e) { var headHtml = $_5iey4vc3jkmcduub.dataToHtml(editor, global$1.extend(data, e.data), headState.get()); headState.set(headHtml); } }); }; var $_kvluac1jkmcduu9 = { open: open }; var register = function (editor, headState) { editor.addCommand('mceFullPageProperties', function () { $_kvluac1jkmcduu9.open(editor, headState); }); }; var $_24h3jic0jkmcduu7 = { register: register }; var protectHtml = function (protect, html) { global$1.each(protect, function (pattern) { html = html.replace(pattern, function (str) { return ''; }); }); return html; }; var unprotectHtml = function (html) { return html.replace(//g, function (a, m) { return unescape(m); }); }; var $_1tsu03c9jkmcduuq = { protectHtml: protectHtml, unprotectHtml: unprotectHtml }; var each = global$1.each; var low = function (s) { return s.replace(/<\/?[A-Z]+/g, function (a) { return a.toLowerCase(); }); }; var handleSetContent = function (editor, headState, footState, evt) { var startPos, endPos, content, headerFragment, styles = ''; var dom = editor.dom; var elm; if (evt.selection) { return; } content = $_1tsu03c9jkmcduuq.protectHtml(editor.settings.protect, evt.content); if (evt.format === 'raw' && headState.get()) { return; } if (evt.source_view && $_9uqi0uc7jkmcduuh.shouldHideInSourceView(editor)) { return; } if (content.length === 0 && !evt.source_view) { content = global$1.trim(headState.get()) + '\n' + global$1.trim(content) + '\n' + global$1.trim(footState.get()); } content = content.replace(/<(\/?)BODY/gi, '<$1body'); startPos = content.indexOf('
\n