diff options
author | till <till@php.net> | 2011-11-02 15:13:42 +0000 |
---|---|---|
committer | till <till@php.net> | 2011-11-02 15:13:42 +0000 |
commit | d6284b4d22d1e6912b01228b7d2a63e9fecbc5fb (patch) | |
tree | 1e29ef0a01f9556908d0984acc1509823aef9760 /program/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js | |
parent | fda58b12a84015a0239bc12abae2e65fdda4391f (diff) |
check-in 3.4.6 (without moxieplayer due to a content-spoofing vulnerability)
Diffstat (limited to 'program/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js')
-rw-r--r-- | program/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/program/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js b/program/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js new file mode 100644 index 000000000..35085e8ad --- /dev/null +++ b/program/js/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<img src="'+b.theme.url+'/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",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.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.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.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/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})();
\ No newline at end of file |