Current Path : /var/www/html/clients/kampol.e-nk.ru/plugins/editors/jce/tiny_mce/plugins/cleanup/ |
Current File : /var/www/html/clients/kampol.e-nk.ru/plugins/editors/jce/tiny_mce/plugins/cleanup/editor_plugin.js |
(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.CleanupPlugin',{init:function(ed,url){var t=this;this.editor=ed;ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(/<pre xml:\s*(.*?)>(.*?)<\/pre>/g,'<pre class="geshi-$1">$2</pre>')});ed.onPostProcess.add(function(ed,o){if(o.set){o.content=o.content.replace(/<pre xml:\s*(.*?)>(.*?)<\/pre>/g,'<pre class="geshi-$1">$2</pre>')}if(o.get){o.content=o.content.replace(/<pre class="geshi-(.*?)">(.*?)<\/pre>/g,'<pre xml:$1>$2</pre>');o.content=o.content.replace(/<a([^>]*)class="jce(box|popup|lightbox|tooltip|_tooltip)"([^>]*)><\/a>/gi,'');o.content=o.content.replace(/<span class="jce(box|popup|lightbox|tooltip|_tooltip)">(.*?)<\/span>/gi,'$2');o.content=o.content.replace(/_mce_(src|href|style|coords|shape)="([^"]+)"\s*?/gi,'');if(ed.getParam('keep_nbsp',true)){o.content=o.content.replace(/\u00a0/g,' ')}}});ed.onGetContent.add(function(ed,o){if(o.save){if(ed.getParam('cleanup_pluginmode')){o.content=o.content.replace(/'/gi,"'");o.content=o.content.replace(/'/gi,"'");o.content=o.content.replace(/&/gi,"&");o.content=o.content.replace(/"/gi,'"')}}})},getInfo:function(){return{longname:'Cleanup',author:'Ryan Demmer',authorurl:'http://www.joomlacontenteditor.net',infourl:'http://www.joomlacontenteditor.net',version:'1.5.7.4'}}});tinymce.PluginManager.add('cleanup',tinymce.plugins.CleanupPlugin)})();