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