]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wordpress/plugin.min.js
WordPress 4.3
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wordpress / plugin.min.js
index 70f8bde607c42b8e330bad8c4668217efedf8359..92e653d1b60e5dc263d237a24daa7d020ff1183b 100644 (file)
@@ -1 +1 @@
-tinymce.ui.FloatPanel.zIndex=100100,tinymce.PluginManager.add("wordpress",function(a){function b(b){var c,e,h,i=0;e="hide"===b,a.theme.panel&&(h=a.theme.panel.find(".toolbar:not(.menubar)")),!h||h.length<2||"hide"===b&&!h[1].visible()||(!b&&h[1].visible()&&(b="hide"),g(h,function(a,c){c>0&&("hide"===b?(a.hide(),i+=30):(a.show(),i-=30))}),i&&!e&&(tinymce.Env.iOS||(c=a.getContentAreaContainer().firstChild,f.setStyle(c,"height",c.clientHeight+i)),"hide"===b?(setUserSetting("hidetb","0"),d&&d.active(!1)):(setUserSetting("hidetb","1"),d&&d.active(!0))),a.fire("wp-toolbar-toggle"))}function c(){}var d,e,f=tinymce.DOM,g=tinymce.each,h=a.editorManager.i18n.translate,i=0;return"undefined"!=typeof window.jQuery&&window.jQuery(document).triggerHandler("tinymce-editor-setup",[a]),a.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){d=this,d.active("1"===getUserSetting("hidetb")?!0:!1)}}),a.on("PostRender",function(){a.getParam("wordpress_adv_hidden",!0)&&"0"===getUserSetting("hidetb","0")&&b("hide")}),a.addCommand("WP_Adv",function(){b()}),a.on("focus",function(){window.wpActiveEditor=a.id}),a.on("BeforeSetContent",function(a){var b;a.content&&(-1!==a.content.indexOf("<!--more")&&(b=h("Read more..."),a.content=a.content.replace(/<!--more(.*?)-->/g,function(a,c){return'<img src="'+tinymce.Env.transparentSrc+'" data-wp-more="more" data-wp-more-text="'+c+'" class="wp-more-tag mce-wp-more" title="'+b+'" data-mce-resize="false" data-mce-placeholder="1" />'})),-1!==a.content.indexOf("<!--nextpage-->")&&(b=h("Page break"),a.content=a.content.replace(/<!--nextpage-->/g,'<img src="'+tinymce.Env.transparentSrc+'" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" title="'+b+'" data-mce-resize="false" data-mce-placeholder="1" />')))}),a.on("PostProcess",function(a){a.get&&(a.content=a.content.replace(/<img[^>]+>/g,function(a){var b,c="";return-1!==a.indexOf('data-wp-more="more"')?((b=a.match(/data-wp-more-text="([^"]+)"/))&&(c=b[1]),a="<!--more"+c+"-->"):-1!==a.indexOf('data-wp-more="nextpage"')&&(a="<!--nextpage-->"),a}))}),a.on("ResolveName",function(b){var c;"IMG"===b.target.nodeName&&(c=a.dom.getAttrib(b.target,"data-wp-more"))&&(b.name=c)}),a.addCommand("WP_More",function(b){var c,d,e,f="wp-more-tag",g=a.dom,i=a.selection.getNode();return b=b||"more",f+=" mce-wp-"+b,e="more"===b?"Read more...":"Next page",e=h(e),d='<img src="'+tinymce.Env.transparentSrc+'" title="'+e+'" class="'+f+'" data-wp-more="'+b+'" data-mce-resize="false" data-mce-placeholder="1" />',"BODY"===i.nodeName||"P"===i.nodeName&&"BODY"===i.parentNode.nodeName?void a.insertContent(d):(c=g.getParent(i,function(a){return a.parentNode&&"BODY"===a.parentNode.nodeName?!0:!1},a.getBody()),void(c&&("P"===c.nodeName?c.appendChild(g.create("p",null,d).firstChild):g.insertAfter(g.create("p",null,d),c),a.nodeChanged())))}),a.addCommand("WP_Code",function(){a.formatter.toggle("code")}),a.addCommand("WP_Page",function(){a.execCommand("WP_More","nextpage")}),a.addCommand("WP_Help",function(){a.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",title:"Keyboard Shortcuts",width:450,height:420,classes:"wp-help",buttons:{text:"Close",onclick:"close"}})}),a.addCommand("WP_Medialib",function(){"undefined"!=typeof wp&&wp.media&&wp.media.editor&&wp.media.editor.open(a.id)}),a.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){a.execCommand("WP_More","more")}}),a.addButton("wp_page",{tooltip:"Page break",onclick:function(){a.execCommand("WP_More","nextpage")}}),a.addButton("wp_help",{tooltip:"Keyboard Shortcuts",cmd:"WP_Help"}),a.addButton("wp_code",{tooltip:"Code",cmd:"WP_Code",stateSelector:"code"}),"undefined"!=typeof wp&&wp.media&&wp.media.editor&&a.addMenuItem("add_media",{text:"Add Media",icon:"wp-media-library",context:"insert",cmd:"WP_Medialib"}),a.addMenuItem("wp_more",{text:"Insert Read More tag",icon:"wp_more",context:"insert",onclick:function(){a.execCommand("WP_More","more")}}),a.addMenuItem("wp_page",{text:"Page break",icon:"wp_page",context:"insert",onclick:function(){a.execCommand("WP_More","nextpage")}}),a.on("BeforeExecCommand",function(b){!tinymce.Env.webkit||"InsertUnorderedList"!==b.command&&"InsertOrderedList"!==b.command||(e||(e=a.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}")),a.getDoc().head.appendChild(e))}),a.on("ExecCommand",function(b){tinymce.Env.webkit&&e&&("InsertUnorderedList"===b.command||"InsertOrderedList"===b.command)&&a.dom.remove(e)}),a.on("init",function(){var b=tinymce.Env,c=["mceContentBody"],d=a.getDoc(),e=a.dom;tinymce.Env.iOS&&e.addClass(d.documentElement,"ios"),"rtl"===a.getParam("directionality")&&(c.push("rtl"),e.setAttrib(d.documentElement,"dir","rtl")),b.ie?9===parseInt(b.ie,10)?c.push("ie9"):8===parseInt(b.ie,10)?c.push("ie8"):b.ie<8&&c.push("ie7"):b.webkit&&c.push("webkit"),c.push("wp-editor"),g(c,function(a){a&&e.addClass(d.body,a)}),a.on("BeforeSetContent",function(a){a.content&&(a.content=a.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi,"<$1$2>"),a.content=a.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi,"</$1>"))}),"undefined"!=typeof window.jQuery&&window.jQuery(document).triggerHandler("tinymce-editor-init",[a]),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&e.bind(d,"dragstart dragend dragover drop",function(a){"undefined"!=typeof window.jQuery&&window.jQuery(document).trigger(new window.jQuery.Event(a))}),a.getParam("wp_paste_filters",!0)&&(tinymce.Env.webkit||a.on("PastePreProcess",function(a){a.content=a.content.replace(/(<[^>]+) style="[^"]*"([^>]*>)/gi,"$1$2"),a.content=a.content.replace(/(<[^>]+) data-mce-style=([^>]+>)/gi,"$1 style=$2")}),a.on("PastePostProcess",function(a){g(e.select("p",a.node),function(a){e.isEmpty(a)&&e.remove(a)})}))}),"undefined"!=typeof window.jQuery&&a.on("keyup",function(b){var c=b.keyCode||b.charCode;c!==i&&((13===c||8===i||46===i)&&window.jQuery(document).triggerHandler("wpcountwords",[a.getContent({format:"raw"})]),i=c)}),a.on("SaveContent",function(b){return!a.inline&&a.isHidden()?void(b.content=b.element.value):(b.content=b.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),void(a.getParam("wpautop",!0)&&"undefined"!=typeof window.switchEditors&&(b.content=window.switchEditors.pre_wpautop(b.content))))}),a.on("BeforeSetContent",function(a){var b=tinymce.Env.webkit?"<p><br /></p>":"<p></p>";a.content&&(a.content=a.content.replace(/<p>(?:&nbsp;|\u00a0|\uFEFF|\s)+<\/p>/gi,b))}),a.on("preInit",function(){a.schema.addValidElements("@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b"),tinymce.Env.iOS&&(a.settings.height=300),g({c:"JustifyCenter",r:"JustifyRight",l:"JustifyLeft",j:"JustifyFull",q:"mceBlockQuote",u:"InsertUnorderedList",o:"InsertOrderedList",s:"unlink",m:"WP_Medialib",z:"WP_Adv",t:"WP_More",d:"Strikethrough",h:"WP_Help",p:"WP_Page",x:"WP_Code"},function(b,c){a.shortcuts.add("access+"+c,"",b)}),a.addShortcut("meta+s","",function(){"undefined"!=typeof wp&&wp.autosave&&wp.autosave.server.triggerSave()})}),function(){function b(b){function i(){k.hide()}function j(){var b,c,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=this.getEl(),z=5,A=8,B=0;if(d)return h=window.pageYOffset||document.documentElement.scrollTop,i=tinymce.$("#wpadminbar")[0],j=tinymce.$(".mce-toolbar-grp",a.getContainer())[0],k=d.getBoundingClientRect(),l=(k.left+k.right)/2,m=(k.top+k.bottom)/2,n=k.top,o=v-k.bottom,p=window.innerWidth,q=y.offsetWidth,r=q/2,s=document.getElementById(a.id+"_ifr"),t=f.getPos(s),u=s.offsetWidth,v=s.offsetHeight,w=y.offsetHeight,x=w+A+z,n>=x?(g=" mce-arrow-down",b=k.top+t.y-w-A):o>=x?(g=" mce-arrow-up",b=k.bottom+t.y):(b=z,g=m>=x?" mce-arrow-down":" mce-arrow-up"),e=j?f.getPos(j).y+j.clientHeight:t.y,h&&(i&&0===i.getBoundingClientRect().top&&(B=i.clientHeight),h+B>e&&(e=h+B)),b&&e&&e+z>b&&(b=e+z,g=""),c=l-r,c+=t.x,k.left<0||k.right>u?c=t.x+(u-q)/2:q>=p?(g+=" mce-arrow-full",c=0):0>c&&k.left+q>p||c+q>p&&k.right-q<0?c=(p-q)/2:c<t.x?(g+=" mce-arrow-left",c=k.left+t.x):c+q>u+t.x&&(g+=" mce-arrow-right",c=k.right-q+t.x),y.className=y.className.replace(/ ?mce-arrow-[\w]+/g,""),y.className+=g,f.setStyles(y,{left:c,top:b}),this}var k,l,m=[];return g(b,function(b){function c(){var c=a.selection;"bullist"===d&&c.selectorChanged("ul > li",function(a,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!=d););b.active(a&&"UL"===d)}),"numlist"===d&&c.selectorChanged("ol > li",function(a,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!==d););b.active(a&&"OL"===d)}),b.settings.stateSelector&&c.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&c.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var d;"|"===b?l=null:e.has(b)?(b={type:b},h.toolbar_items_size&&(b.size=h.toolbar_items_size),m.push(b),l=null):(l||(l={type:"buttongroup",items:[]},m.push(l)),a.buttons[b]&&(d=b,b=a.buttons[d],"function"==typeof b&&(b=b()),b.type=b.type||"button",h.toolbar_items_size&&(b.size=h.toolbar_items_size),b=e.create(b),l.items.push(b),a.initialized?c():a.on("init",c)))}),k=e.create({type:"panel",layout:"stack",classes:"toolbar-grp inline-toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:[{type:"toolbar",layout:"flow",items:m}]}),k.on("show",function(){c=this,this.reposition()}),k.on("hide",function(){c=!1}),k.on("keydown",function(b){27===b.keyCode&&(this.hide(),a.focus())}),k.on("remove",function(){f.unbind(window,"resize scroll",i),a.dom.unbind(a.getWin(),"resize scroll",i),a.off("blur hide",i)}),a.once("init",function(){f.bind(window,"resize scroll",i),a.dom.bind(a.getWin(),"resize scroll",i),a.on("blur hide",i)}),k.reposition=j,k.hide().renderTo(document.body),k}var c,d,e=tinymce.ui.Factory,h=a.settings;a.shortcuts.add("alt+119","",function(){var a;c&&(a=c.find("toolbar")[0],a&&a.focus(!0))}),a.on("nodechange",function(b){var e=a.selection.isCollapsed(),f={element:b.element,parents:b.parents,collapsed:e};a.fire("wptoolbar",f),d=f.selection||f.element,c&&c.hide(),f.toolbar&&f.toolbar.show()}),a.wp=a.wp||{},a.wp._createToolbar=b}(),{_showButtons:c,_hideButtons:c,_setEmbed:c,_getEmbed:c}});
\ No newline at end of file
+!function(a){a.ui.FloatPanel.zIndex=100100,a.PluginManager.add("wordpress",function(b){function c(c){var d,f,i,j=0;f="hide"===c,b.theme.panel&&(i=b.theme.panel.find(".toolbar:not(.menubar)")),!i||i.length<2||"hide"===c&&!i[1].visible()||(!c&&i[1].visible()&&(c="hide"),h(i,function(a,b){b>0&&("hide"===c?(a.hide(),j+=30):(a.show(),j-=30))}),j&&!f&&(a.Env.iOS||(d=b.getContentAreaContainer().firstChild,g.setStyle(d,"height",d.clientHeight+j)),"hide"===c?(setUserSetting("hidetb","0"),e&&e.active(!1)):(setUserSetting("hidetb","1"),e&&e.active(!0))),b.fire("wp-toolbar-toggle"))}function d(){}var e,f,g=a.DOM,h=a.each,i=b.editorManager.i18n.translate,j=window.jQuery,k=window.wp,l=k&&k.editor&&k.editor.autop&&b.getParam("wpautop",!0);return j&&j(document).triggerHandler("tinymce-editor-setup",[b]),b.addButton("wp_adv",{tooltip:"Toolbar Toggle",cmd:"WP_Adv",onPostRender:function(){e=this,e.active("1"===getUserSetting("hidetb")?!0:!1)}}),b.on("PostRender",function(){b.getParam("wordpress_adv_hidden",!0)&&"0"===getUserSetting("hidetb","0")&&c("hide")}),b.addCommand("WP_Adv",function(){c()}),b.on("focus",function(){window.wpActiveEditor=b.id}),b.on("BeforeSetContent",function(b){var c;b.content&&(-1!==b.content.indexOf("<!--more")&&(c=i("Read more..."),b.content=b.content.replace(/<!--more(.*?)-->/g,function(b,d){return'<img src="'+a.Env.transparentSrc+'" data-wp-more="more" data-wp-more-text="'+d+'" class="wp-more-tag mce-wp-more" title="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />'})),-1!==b.content.indexOf("<!--nextpage-->")&&(c=i("Page break"),b.content=b.content.replace(/<!--nextpage-->/g,'<img src="'+a.Env.transparentSrc+'" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" title="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />')),b.load&&"raw"!==b.format&&l&&(b.content=k.editor.autop(b.content)),b.content=b.content.replace(/<p>(?:&nbsp;|\u00a0|\uFEFF|\s)+<\/p>/gi,"<p><br /></p>"))}),b.on("PostProcess",function(a){a.get&&(a.content=a.content.replace(/<img[^>]+>/g,function(a){var b,c="";return-1!==a.indexOf('data-wp-more="more"')?((b=a.match(/data-wp-more-text="([^"]+)"/))&&(c=b[1]),a="<!--more"+c+"-->"):-1!==a.indexOf('data-wp-more="nextpage"')&&(a="<!--nextpage-->"),a}))}),b.on("ResolveName",function(a){var c;"IMG"===a.target.nodeName&&(c=b.dom.getAttrib(a.target,"data-wp-more"))&&(a.name=c)}),b.addCommand("WP_More",function(c){var d,e,f,g="wp-more-tag",h=b.dom,j=b.selection.getNode();return c=c||"more",g+=" mce-wp-"+c,f="more"===c?"Read more...":"Next page",f=i(f),e='<img src="'+a.Env.transparentSrc+'" title="'+f+'" class="'+g+'" data-wp-more="'+c+'" data-mce-resize="false" data-mce-placeholder="1" />',"BODY"===j.nodeName||"P"===j.nodeName&&"BODY"===j.parentNode.nodeName?void b.insertContent(e):(d=h.getParent(j,function(a){return a.parentNode&&"BODY"===a.parentNode.nodeName?!0:!1},b.getBody()),void(d&&("P"===d.nodeName?d.appendChild(h.create("p",null,e).firstChild):h.insertAfter(h.create("p",null,e),d),b.nodeChanged())))}),b.addCommand("WP_Code",function(){b.formatter.toggle("code")}),b.addCommand("WP_Page",function(){b.execCommand("WP_More","nextpage")}),b.addCommand("WP_Help",function(){function c(a){var b="<tr>";return h(a,function(a,c){b+=a?"<td><kbd>"+c+"</kbd></td><td>"+i(a)+"</td>":"<td></td><td></td>"}),b+"</tr>"}var d,e,f,g,j=i(a.Env.mac?"Ctrl + Alt + letter:":"Shift + Alt + letter:"),k=i(a.Env.mac?"Cmd + letter:":"Ctrl + letter:"),l=[],m=[];h([{c:"Copy",x:"Cut"},{v:"Paste",a:"Select all"},{z:"Undo",y:"Redo"},{b:"Bold",i:"Italic"},{u:"Underline",k:"Insert/edit link"}],function(a){l.push(c(a))}),h([{1:"Heading 1",2:"Heading 2"},{3:"Heading 3",4:"Heading 4"},{5:"Heading 5",6:"Heading 6"},{l:"Align left",c:"Align center"},{r:"Align right",j:"Justify"},{d:"Strikethrough",q:"Blockquote"},{u:"Bullet list",o:"Numbered list"},{a:"Insert/edit link",s:"Remove link"},{m:"Insert/edit image",t:"Insert Read More tag"},{h:"Keyboard Shortcuts",x:"Code"},{p:"Insert Page Break tag",w:"Distraction-free writing mode"}],function(a){m.push(c(a))}),d=[i("Letter"),i("Action"),i("Letter"),i("Action")],d="<tr><th>"+d.join("</th><th>")+"</th></tr>",e='<div class="wp-editor-help">',e=e+"<h2>"+i("Default shortcuts,")+" "+k+'</h2><table class="wp-help-th-center">'+d+l.join("")+"</table><h2>"+i("Additional shortcuts,")+" "+j+'</h2><table class="wp-help-th-center">'+d+m.join("")+"</table>",b.plugins.wptextpattern&&(e=e+"<h2>"+i("When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.")+"</h2><table>"+c({"*":"Bullet list"})+c({"-":"Bullet list"})+c({"1.":"Numbered list"})+c({"1)":"Numbered list"})+"</table>",e=e+"<h2>"+i("The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.")+"</h2><table>"+c({">":"Blockquote"})+c({"##":"Heading 2"})+c({"###":"Heading 3"})+c({"####":"Heading 4"})+c({"#####":"Heading 5"})+c({"######":"Heading 6"})+"</table>"),e=e+"<h2>"+i("Focus shortcuts:")+"</h2><table>"+c({"Alt + F8":"Inline toolbar (when an image, link or preview is selected)"})+c({"Alt + F9":"Editor menu (when enabled)"})+c({"Alt + F10":"Editor toolbar"})+c({"Alt + F11":"Elements path"})+"</table><p>"+i("To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.")+"</p>",e+="</div>",f=b.windowManager.open({title:"Keyboard Shortcuts",items:{type:"container",classes:"wp-help",html:e},buttons:{text:"Close",onclick:"close"}}),f.$el&&(f.$el.find('div[role="application"]').attr("role","document"),g=f.$el.find(".mce-wp-help"),g[0]&&(g.attr("tabindex","0"),g[0].focus(),g.on("keydown",function(a){a.keyCode>=33&&a.keyCode<=40&&a.stopPropagation()})))}),b.addCommand("WP_Medialib",function(){k&&k.media&&k.media.editor&&k.media.editor.open(b.id)}),b.addButton("wp_more",{tooltip:"Insert Read More tag",onclick:function(){b.execCommand("WP_More","more")}}),b.addButton("wp_page",{tooltip:"Page break",onclick:function(){b.execCommand("WP_More","nextpage")}}),b.addButton("wp_help",{tooltip:"Keyboard Shortcuts",cmd:"WP_Help"}),b.addButton("wp_code",{tooltip:"Code",cmd:"WP_Code",stateSelector:"code"}),k&&k.media&&k.media.editor&&b.addMenuItem("add_media",{text:"Add Media",icon:"wp-media-library",context:"insert",cmd:"WP_Medialib"}),b.addMenuItem("wp_more",{text:"Insert Read More tag",icon:"wp_more",context:"insert",onclick:function(){b.execCommand("WP_More","more")}}),b.addMenuItem("wp_page",{text:"Page break",icon:"wp_page",context:"insert",onclick:function(){b.execCommand("WP_More","nextpage")}}),b.on("BeforeExecCommand",function(c){!a.Env.webkit||"InsertUnorderedList"!==c.command&&"InsertOrderedList"!==c.command||(f||(f=b.dom.create("style",{type:"text/css"},"#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}")),b.getDoc().head.appendChild(f))}),b.on("ExecCommand",function(c){a.Env.webkit&&f&&("InsertUnorderedList"===c.command||"InsertOrderedList"===c.command)&&b.dom.remove(f)}),b.on("init",function(){var c=a.Env,d=["mceContentBody"],e=b.getDoc(),f=b.dom;c.iOS&&f.addClass(e.documentElement,"ios"),"rtl"===b.getParam("directionality")&&(d.push("rtl"),f.setAttrib(e.documentElement,"dir","rtl")),c.ie?9===parseInt(c.ie,10)?d.push("ie9"):8===parseInt(c.ie,10)?d.push("ie8"):c.ie<8&&d.push("ie7"):c.webkit&&d.push("webkit"),d.push("wp-editor"),h(d,function(a){a&&f.addClass(e.body,a)}),b.on("BeforeSetContent",function(a){a.content&&(a.content=a.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)( [^>]*)?>/gi,"<$1$2>").replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre)>\s*<\/p>/gi,"</$1>"))}),j&&j(document).triggerHandler("tinymce-editor-init",[b]),window.tinyMCEPreInit&&window.tinyMCEPreInit.dragDropUpload&&f.bind(e,"dragstart dragend dragover drop",function(a){j&&j(document).trigger(new j.Event(a))}),b.getParam("wp_paste_filters",!0)&&(a.Env.webkit||b.on("PastePreProcess",function(a){a.content=a.content.replace(/(<[^>]+) style="[^"]*"([^>]*>)/gi,"$1$2"),a.content=a.content.replace(/(<[^>]+) data-mce-style=([^>]+>)/gi,"$1 style=$2")}),b.on("PastePostProcess",function(a){h(f.select("p",a.node),function(a){f.isEmpty(a)&&f.remove(a)})}))}),b.on("SaveContent",function(a){return!b.inline&&b.isHidden()?void(a.content=a.element.value):(a.content=a.content.replace(/<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g,"<p>&nbsp;</p>"),void(l&&(a.content=k.editor.removep(a.content))))}),b.on("preInit",function(){var c="@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b,script[src|async|defer|type|charset|crossorigin|integrity]";b.schema.addValidElements(c),a.Env.iOS&&(b.settings.height=300),h({c:"JustifyCenter",r:"JustifyRight",l:"JustifyLeft",j:"JustifyFull",q:"mceBlockQuote",u:"InsertUnorderedList",o:"InsertOrderedList",s:"unlink",m:"WP_Medialib",z:"WP_Adv",t:"WP_More",d:"Strikethrough",h:"WP_Help",p:"WP_Page",x:"WP_Code"},function(a,c){b.shortcuts.add("access+"+c,"",a)}),b.addShortcut("meta+s","",function(){k&&k.autosave&&k.autosave.server.triggerSave()})}),b.on("preinit",function(){function c(a,c){function d(){if(!f)return this;var a,b,c=window.pageXOffset||document.documentElement.scrollLeft,d=window.pageYOffset||document.documentElement.scrollTop,e=window.innerWidth,h=window.innerHeight,i=q?q.getBoundingClientRect():{top:0,right:e,bottom:h,left:0,width:e,height:h},m=this.getEl(),n=m.offsetWidth,o=m.offsetHeight,r=f.getBoundingClientRect(),s=(r.left+r.right)/2,t=5,u=8,v=o+u+t,w=p?p.getBoundingClientRect().bottom:0,x=j?j.getBoundingClientRect().bottom:0,y=k?h-k.getBoundingClientRect().top:0,z=l?h-l.getBoundingClientRect().top:0,A=Math.max(0,w,x,i.top),B=Math.max(0,y,z,h-i.bottom),C=r.top+i.top-A,D=h-i.top-r.bottom-B,E=h-A-B,F="";return C>=E||D>=E?this.hide():(this.bottom?D>=v?(F=" mce-arrow-up",a=r.bottom+i.top+d):C>=v&&(F=" mce-arrow-down",a=r.top+i.top+d-o-u):C>=v?(F=" mce-arrow-down",a=r.top+i.top+d-o-u):D>=v&&E/2>r.bottom+i.top-A&&(F=" mce-arrow-up",a=r.bottom+i.top+d),"undefined"==typeof a&&(a=d+A+t),b=s-n/2+i.left+c,r.left<0||r.right>i.width?b=i.left+c+(i.width-n)/2:n>=e?(F+=" mce-arrow-full",b=0):0>b&&r.left+n>e||b+n>e&&r.right-n<0?b=(e-n)/2:b<i.left+c?(F+=" mce-arrow-left",b=r.left+i.left+c):b+n>i.width+i.left+c&&(F+=" mce-arrow-right",b=r.right-n+i.left+c),m.className=m.className.replace(/ ?mce-arrow-[\w]+/g,"")+F,g.setStyles(m,{left:b,top:a}),this)}var e,i,o=[];return h(a,function(a){function c(){var c=b.selection;"bullist"===d&&c.selectorChanged("ul > li",function(b,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!=d););a.active(b&&"UL"===d)}),"numlist"===d&&c.selectorChanged("ol > li",function(b,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!==d&&"UL"!==d););a.active(b&&"OL"===d)}),a.settings.stateSelector&&c.selectorChanged(a.settings.stateSelector,function(b){a.active(b)},!0),a.settings.disabledStateSelector&&c.selectorChanged(a.settings.disabledStateSelector,function(b){a.disabled(b)})}var d;"|"===a?i=null:m.has(a)?(a={type:a},n.toolbar_items_size&&(a.size=n.toolbar_items_size),o.push(a),i=null):(i||(i={type:"buttongroup",items:[]},o.push(i)),b.buttons[a]&&(d=a,a=b.buttons[d],"function"==typeof a&&(a=a()),a.type=a.type||"button",n.toolbar_items_size&&(a.size=n.toolbar_items_size),a=m.create(a),i.items.push(a),b.initialized?c():b.on("init",c)))}),e=m.create({type:"panel",layout:"stack",classes:"toolbar-grp inline-toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:[{type:"toolbar",layout:"flow",items:o}]}),e.bottom=c,e.on("show",function(){this.reposition()}),e.on("keydown",function(a){27===a.keyCode&&(this.hide(),b.focus())}),b.on("remove",function(){e.remove()}),e.reposition=d,e.hide().renderTo(document.body),e}function d(a){e&&(e.hide(),"hide"===a.type?e=!1:("resize"===a.type||"scroll"===a.type)&&(clearTimeout(i),i=setTimeout(function(){e&&"function"==typeof e.show&&e.show()},250)))}var e,f,i,j,k,l,m=a.ui.Factory,n=b.settings,o=b.getContainer(),p=document.getElementById("wpadminbar"),q=document.getElementById(b.id+"_ifr");o&&(j=a.$(".mce-toolbar-grp",o)[0],k=a.$(".mce-statusbar",o)[0]),"content"===b.id&&(l=document.getElementById("post-status-info")),b.shortcuts.add("alt+119","",function(){var a;e&&(a=e.find("toolbar")[0],a&&a.focus(!0))}),b.on("nodechange",function(a){var c=b.selection.isCollapsed(),d={element:a.element,parents:a.parents,collapsed:c};b.fire("wptoolbar",d),f=d.selection||d.element,e&&e.hide(),d.toolbar?(e=d.toolbar,e.show()):e=!1}),b.on("focus",function(){e&&e.show()}),g.bind(window,"resize scroll",d),b.dom.bind(b.getWin(),"resize scroll",d),b.on("remove",function(){g.unbind(window,"resize scroll",d),b.dom.unbind(b.getWin(),"resize scroll",d)}),b.on("blur hide",d),b.wp=b.wp||{},b.wp._createToolbar=c},!0),{_showButtons:d,_hideButtons:d,_setEmbed:d,_getEmbed:d}})}(window.tinymce);
\ No newline at end of file