Open-Source PHP Framework - Designed for rapid development of performance-oriented scalable applications

/webroot/js/tinymce/plugins/pagebreak/editor_plugin.js

[return to app]
1 (function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<img
 src="'
+d+'/img/trans.gif" class="mcePageBreak mceItemNoResize"
 />'
,a="mcePageBreak",c=b.getParam("pagebreak_separator","<!-- pagebreak -->"),e;e=new
 
RegExp(c.replace(/[?.*[](){}+^$:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",funct
 
ion(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add
 
(function(){if(b.settings.content_css!==false){b.dom.loadCSS(d+"/css/content.css")}if(b.theme.onResolveName){b.the
 
me.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b
 
.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNod
 
eChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetConten
 
t.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.con
 
tent.replace(/<img[^>]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return
 
i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems
 AB"
,authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebrea
 k"
,version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins
 
.PageBreakPlugin)})();