aboutsummaryrefslogtreecommitdiff
path: root/data/stuff/tinymce-4.3.7/plugins/pagebreak
diff options
context:
space:
mode:
Diffstat (limited to 'data/stuff/tinymce-4.3.7/plugins/pagebreak')
-rw-r--r--data/stuff/tinymce-4.3.7/plugins/pagebreak/plugin.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/data/stuff/tinymce-4.3.7/plugins/pagebreak/plugin.min.js b/data/stuff/tinymce-4.3.7/plugins/pagebreak/plugin.min.js
new file mode 100644
index 0000000..2a69eba
--- /dev/null
+++ b/data/stuff/tinymce-4.3.7/plugins/pagebreak/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("pagebreak",function(a){var b="mce-pagebreak",c=a.getParam("pagebreak_separator","<!-- pagebreak -->"),d=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),e='<img src="'+tinymce.Env.transparentSrc+'" class="'+b+'" data-mce-resize="false" data-mce-placeholder />';a.addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("<p>"+e+"</p>"):a.insertContent(e)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(c){"IMG"==c.target.nodeName&&a.dom.hasClass(c.target,b)&&(c.name="pagebreak")}),a.on("click",function(c){c=c.target,"IMG"===c.nodeName&&a.dom.hasClass(c,b)&&a.selection.select(c)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(d,e)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var d,e,f=b.length;f--;)if(d=b[f],e=d.attr("class"),e&&-1!==e.indexOf("mce-pagebreak")){var g=d.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=c,g.raw=!0,d.remove();continue}d.type=3,d.value=c,d.raw=!0}})})}); \ No newline at end of file