/* Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add('styles',{requires:['selection']});CKEDITOR.editor.prototype.attachStyleStateChange=function(a,b){var c=this._.styleStateChangeCallbacks;if(!c){c=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(d){for(var e=0;e'+C+'';else A.setHtml(C);B.remove();};function i(A){var B=/(\S\s*)\n(?:\s|(]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,C=A.getName(),D=j(A.getOuterHtml(),B,function(F,G,H){return G+''+H+'
';}),E=[];D.replace(/
([\s\S]*?)<\/pre>/gi,function(F,G){E.push(G);});return E;};function j(A,B,C){var D='',E='';A=A.replace(/(^]+_fck_bookmark.*?\/span>)|(]+_fck_bookmark.*?\/span>$)/gi,function(F,G,H){G&&(D=G);H&&(E=H);return '';});return D+A.replace(B,C)+E;};function k(A,B){var C=new CKEDITOR.dom.documentFragment(B.getDocument());for(var D=0;D');E=E.replace(/[ \t]{2,}/g,function(G){return CKEDITOR.tools.repeat(' ',G.length-1)+' ';
});var F=B.clone();F.setHtml(E);C.append(F);}return C;};function l(A,B){var C=A.getHtml();C=j(C,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');C=C.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');C=C.replace(/([ \t\n\r]+| )/g,' ');C=C.replace(/]*>/gi,'\n');if(CKEDITOR.env.ie){var D=A.getDocument().createElement('div');D.append(B);B.$.outerHTML='
'+C+'
';B=D.getFirst().remove();}else B.setHtml(C);return B;};function m(A,B){var C=A._.definition,D=C.attributes,E=C.styles,F=x(A);function G(){for(var I in D){if(I=='class'&&B.getAttribute(I)!=D[I])continue;B.removeAttribute(I);}};G();for(var H in E)B.removeStyle(H);D=F[B.getName()];if(D)G();p(B);};function n(A,B){var C=A._.definition,D=C.attributes,E=C.styles,F=x(A),G=B.getElementsByTag(A.element);for(var H=G.count();--H>=0;)m(A,G.getItem(H));for(var I in F)if(I!=A.element){G=B.getElementsByTag(I);for(H=G.count()-1;H>=0;H--){var J=G.getItem(H);o(J,F[I]);}}};function o(A,B){var C=B&&B.attributes;if(C)for(var D=0;D