CKEDITOR.plugins.add('typeset',{init:function(a){a.addCommand('typeset',CKEDITOR.plugins.typeset);a.ui.addButton('typeset',{label:a.lang.typeset,command:'typeset'});}});CKEDITOR.plugins.typeset={exec:function(a){var b=String.fromCharCode(12288),c=a.getData().replace(new RegExp('\t(?: |&nbsp;|'+b+')*(?!<br />)+','ig'),'\t'+b+b).replace(/(<br \/>\n\t)(\1*)/ig,'$1$1');a.fire('saveSnapshot');setTimeout(function(){a.setData(c,function(){this.updateElement();this.focus();});a.fire('saveSnapshot');},1);}};
