diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-04-03 02:27:10 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-04-03 02:27:10 -0400 |
commit | fda56e40b460ab06b6abee98ae1bc7d5f5847c9f (patch) | |
tree | 29c3ddbf0ae3d47370019fb969920b07f27fc015 /data/stuff/tinymce-4.3.7/plugins/pagebreak | |
parent | b53fb6a4edc0e7b8a6cbfa1f6ca9db4e1895add6 (diff) | |
download | old-guff-fda56e40b460ab06b6abee98ae1bc7d5f5847c9f.tar.bz2 old-guff-fda56e40b460ab06b6abee98ae1bc7d5f5847c9f.zip |
add tinymce
Diffstat (limited to 'data/stuff/tinymce-4.3.7/plugins/pagebreak')
-rw-r--r-- | data/stuff/tinymce-4.3.7/plugins/pagebreak/plugin.min.js | 1 |
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 |