CKEDITOR.plugins.add('format',{requires:['richcombo','styles'],init:function(a){var b=a.config,c=a.lang.format,d=b.format_tags.split(';'),e={};for(var f=0;f<d.length;f++){var g=d[f];e[g]=new CKEDITOR.style(b['format_'+g]);e[g]._.enterMode=a.config.enterMode;}a.ui.addRichCombo('Format',{label:c.label,title:c.panelTitle,className:'cke_format',panel:{css:a.skin.editor.css.concat(b.contentsCss),multiSelect:false,attributes:{'aria-label':c.panelTitle}},init:function(){this.startGroup(c.panelTitle);for(var h in e){var i=c['tag_'+h];this.add(h,'<'+h+'>'+i+'</'+h+'>',i);}},onClick:function(h){a.focus();a.fire('saveSnapshot');e[h].apply(a.document);setTimeout(function(){a.fire('saveSnapshot');},0);},onRender:function(){a.on('selectionChange',function(h){var i=this.getValue(),j=h.data.path;for(var k in e){if(e[k].checkActive(j)){if(k!=i)this.setValue(k,a.lang.format['tag_'+k]);return;}}this.setValue('');},this);}});}});CKEDITOR.config.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';CKEDITOR.config.format_p={element:'p'};CKEDITOR.config.format_div={element:'div'};CKEDITOR.config.format_pre={element:'pre'};CKEDITOR.config.format_address={element:'address'};CKEDITOR.config.format_h1={element:'h1'};CKEDITOR.config.format_h2={element:'h2'};CKEDITOR.config.format_h3={element:'h3'};CKEDITOR.config.format_h4={element:'h4'};CKEDITOR.config.format_h5={element:'h5'};CKEDITOR.config.format_h6={element:'h6'};
