!function(e){e.onAddEditor.addToTop((function(e,t){t.settings.inline_styles=!1})),e.create("tinymce.plugins.LegacyOutput",{init:function(t){t.onInit.add((function(){var n="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",i=e.explode(t.settings.font_size_style_values),l=t.schema;t.formatter.register({alignleft:{selector:n,attributes:{align:"left"}},aligncenter:{selector:n,attributes:{align:"center"}},alignright:{selector:n,attributes:{align:"right"}},alignfull:{selector:n,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(i,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),(function(e){l.addValidElements(e+"[*]")})),l.getElementRule("font")||l.addValidElements("font[face|size|color|style]"),e.each(n.split(","),(function(e){var t=l.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})),t.onNodeChange.add((function(t,n){var l,o,a,r;(o=t.dom.getParent(t.selection.getNode(),"font"))&&(a=o.face,r=o.size),(l=n.get("fontselect"))&&l.select((function(e){return e==a})),(l=n.get("fontsizeselect"))&&l.select((function(t){return e.inArray(i,t.fontSize)+1==r}))}))}))},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:e.majorVersion+"."+e.minorVersion}}}),e.PluginManager.add("legacyoutput",e.plugins.LegacyOutput)}(tinymce);
