PHP Classes

File: CMF/Web/scripts/tinymce/plugins/pagebreak/plugin.min.js

Recommend this page to a friend!
  Classes of Burge Lab   BurgeATS   CMF/Web/scripts/tinymce/plugins/pagebreak/plugin.min.js   Download  
File: CMF/Web/scripts/tinymce/plugins/pagebreak/plugin.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: BurgeATS
CRM, Ticketing system, and employee manangement
Author: By
Last change: Update of CMF/Web/scripts/tinymce/plugins/pagebreak/plugin.min.js
Date: 1 year ago
Size: 1,230 bytes
 

Contents

Class file image Download
tinymce.PluginManager.add("pagebreak",function(e){var t="mce-pagebreak",n=e.getParam("pagebreak_separator","<!-- pagebreak -->"),r=new RegExp(n.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),i='<img src="'+tinymce.Env.transparentSrc+'" class="'+t+'" data-mce-resize="false" data-mce-placeholder />';e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+i+"</p>"):e.insertContent(i)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(n){"IMG"==n.target.nodeName&&e.dom.hasClass(n.target,t)&&(n.name="pagebreak")}),e.on("click",function(n){n=n.target,"IMG"===n.nodeName&&e.dom.hasClass(n,t)&&e.selection.select(n)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(r,i)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(t){for(var r,i,o=t.length;o--;)if(r=t[o],i=r.attr("class"),i&&-1!==i.indexOf("mce-pagebreak")){var a=r.parent;if(e.schema.getBlockElements()[a.name]&&e.settings.pagebreak_split_block){a.type=3,a.value=n,a.raw=!0,r.remove();continue}r.type=3,r.value=n,r.raw=!0}})})});