tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(e,n){var a,t='<img src="'+e.theme.url+'/img/trans.gif" class="mcePageBreak mceItemNoResize" />',o="mcePageBreak",c=e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e");a=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(function(e){return"\\"+e})),"g"),e.addCommand("mcePageBreak",(function(){e.execCommand("mceInsertContent",0,t)})),e.addButton("pagebreak",{title:"pagebreak.desc",cmd:o}),e.onInit.add((function(){e.theme.onResolveName&&e.theme.onResolveName.add((function(n,a){"IMG"==a.node.nodeName&&e.dom.hasClass(a.node,o)&&(a.name="pagebreak")}))})),e.onClick.add((function(e,n){"IMG"===(n=n.target).nodeName&&e.dom.hasClass(n,o)&&e.selection.select(n)})),e.onNodeChange.add((function(e,n,a){n.setActive("pagebreak","IMG"===a.nodeName&&e.dom.hasClass(a,o))})),e.onBeforeSetContent.add((function(e,n){n.content=n.content.replace(a,t)})),e.onPostProcess.add((function(e,n){n.get&&(n.content=n.content.replace(/<img[^>]+>/g,(function(e){return-1!==e.indexOf('class="mcePageBreak')&&(e=c),e})))}))},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);
