diff --git a/wp-admin/js/editor-expand.js b/wp-admin/js/editor-expand.js index a47c548dc9..d1a646ca85 100644 --- a/wp-admin/js/editor-expand.js +++ b/wp-admin/js/editor-expand.js @@ -33,7 +33,7 @@ $sideSortables = $( '#side-sortables' ), $postboxContainer = $( '#postbox-container-1' ), $postBody = $('#post-body'), - fullscreen = window.wp.editor && window.wp.editor.fullscreen, + fullscreen = window.wp.oldEditor && window.wp.oldEditor.fullscreen, mceEditor, mceBind = function(){}, mceUnbind = function(){}, @@ -1603,8 +1603,8 @@ } window.wp = window.wp || {}; - window.wp.editor = window.wp.editor || {}; - window.wp.editor.dfw = { + window.wp.oldEditor = window.wp.oldEditor || {}; + window.wp.oldEditor.dfw = { activate: activate, deactivate: deactivate, isActive: isActive, diff --git a/wp-admin/js/editor-expand.min.js b/wp-admin/js/editor-expand.min.js index 7f0c2e93a5..5fc40ea32a 100644 --- a/wp-admin/js/editor-expand.min.js +++ b/wp-admin/js/editor-expand.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(F,I){"use strict";var L=I(F),M=I(document),V=I("#wpadminbar"),N=I("#wpfooter");I(function(){var g,e,u=I("#postdivrich"),h=I("#wp-content-wrap"),m=I("#wp-content-editor-tools"),w=I(),H=I(),b=I("#ed_toolbar"),v=I("#content"),i=v[0],o=0,x=I("#post-status-info"),y=I(),T=I(),B=I("#side-sortables"),C=I("#postbox-container-1"),S=I("#post-body"),O=F.wp.editor&&F.wp.editor.fullscreen,r=function(){},l=function(){},z=!1,E=!1,k=!1,A=!1,W=0,K=56,R=20,Y=300,n=h.hasClass("tmce-active")?"tinymce":"html",U=!!parseInt(F.getUserSetting("hidetb"),10),D={windowHeight:0,windowWidth:0,adminBarHeight:0,toolsHeight:0,menuBarHeight:0,visualTopHeight:0,textTopHeight:0,bottomHeight:0,statusBarHeight:0,sideSortablesHeight:0},s=F._.throttle(function(){var t=F.scrollX||document.documentElement.scrollLeft,e=F.scrollY||document.documentElement.scrollTop,o=parseInt(i.style.height,10);i.style.height=Y+"px",i.scrollHeight>Y&&(i.style.height=i.scrollHeight+"px"),void 0!==t&&F.scrollTo(t,e),i.scrollHeight=p-D.toolsHeight-D.adminBarHeight&&e<=p-D.toolsHeight-D.adminBarHeight+l-n?(z=!0,m.css({position:"fixed",top:D.adminBarHeight,width:f}),i&&y.length&&y.css({position:"fixed",top:D.adminBarHeight+D.toolsHeight,width:f-2-(i?0:a.outerWidth()-a.width())}),a.css({position:"fixed",top:D.adminBarHeight+D.toolsHeight+D.menuBarHeight,width:f-2-(i?0:a.outerWidth()-a.width())})):(z||o)&&(e<=p-D.toolsHeight-D.adminBarHeight?(z=!1,m.css({position:"absolute",top:0,width:f}),i&&y.length&&y.css({position:"absolute",top:0,width:f-2}),a.css({position:"absolute",top:D.menuBarHeight,width:f-2-(i?0:a.outerWidth()-a.width())})):e>=p-D.toolsHeight-D.adminBarHeight+l-n&&(z=!1,m.css({position:"absolute",top:l-n,width:f}),i&&y.length&&y.css({position:"absolute",top:l-n,width:f-2}),a.css({position:"absolute",top:l-n+D.menuBarHeight,width:f-2-(i?0:a.outerWidth()-a.width())}))),(!E||o&&U)&&e+D.windowHeight<=r+l+D.bottomHeight+D.statusBarHeight+1?t&&0r+l+D.bottomHeight+D.statusBarHeight-1)&&(E=!1,T.attr("style",U?"":"visibility: hidden;"),x.attr("style",""))):o&&(m.css({position:"absolute",top:0,width:f}),i&&y.length&&y.css({position:"absolute",top:0,width:f-2}),a.css({position:"absolute",top:D.menuBarHeight,width:f-2-(i?0:a.outerWidth()-a.width())}),T.attr("style",U?"":"visibility: hidden;"),x.attr("style","")),C.width()<300&&600B.height()+s+120&&D.windowHeightD.windowHeight||k||A?e+K<=s?(B.attr("style",""),k=A=!1):W=e+K&&(k=!0,B.css({position:"fixed",top:K,bottom:""}))):(s-K<=e?B.css({position:"fixed",top:K}):B.attr("style",""),k=A=!1),W=e):(B.attr("style",""),k=A=!1),o&&(h.css({paddingTop:D.toolsHeight}),i?H.css({paddingTop:D.visualTopHeight+D.menuBarHeight}):v.css({marginTop:D.textTopHeight}))))}function f(){P(),p()}function X(t){for(var e=1;e<6;e++)setTimeout(t,500*e)}function t(){F.pageYOffset&&130K&&(A=!0,F.scrollBy(0,-1),p(),F.scrollBy(0,1)),p()}).on("wp-window-resized.editor-expand",function(){g&&!g.isHidden()?g.execCommand("wpAutoResize"):P()}),v.on("focus.editor-expand input.editor-expand propertychange.editor-expand",P),r(),O&&O.pubsub.subscribe("hidden",f),g&&(g.settings.wp_autoresize_on=!0,g.execCommand("wpAutoResizeOn"),g.isHidden()||g.execCommand("wpAutoResize")),g&&!g.isHidden()||P(),p(),M.trigger("editor-expand-on")}function a(){var t=parseInt(F.getUserSetting("ed_size",300),10);t<50?t=50:5e3t&&F.scrollTo(F.pageXOffset,t-D.adminBarHeight),P(),p()},100),p()}function c(){U=!U}"content"===f.id&&((g=f).settings.autoresize_min_height=Y,w=h.find(".mce-toolbar-grp"),H=h.find(".mce-edit-area"),T=h.find(".mce-statusbar"),y=h.find(".mce-menubar"),r=function(){f.on("keyup",o),f.on("show",s),f.on("hide",d),f.on("wp-toolbar-toggle",c),f.on("setcontent wp-autoresize wp-toolbar-toggle",p),f.on("undo redo",i),f.on("FullscreenStateChanged",n),L.off("scroll.mce-float-panels").on("scroll.mce-float-panels",e)},l=function(){f.off("keyup",o),f.off("show",s),f.off("hide",d),f.off("wp-toolbar-toggle",c),f.off("setcontent wp-autoresize wp-toolbar-toggle",p),f.off("undo redo",i),f.off("FullscreenStateChanged",n),L.off("scroll.mce-float-panels")},u.hasClass("wp-editor-expand")&&(r(),X(p)))}),u.hasClass("wp-editor-expand")&&(t(),h.hasClass("html-active")&&X(function(){p(),P()})),I("#adv-settings .editor-expand").show(),I("#editor-expand-toggle").on("change.editor-expand",function(){I(this).prop("checked")?(t(),F.setUserSetting("editor_expand","on")):(a(),F.setUserSetting("editor_expand","off"))}),F.editorExpand={on:t,off:a}}),I(function(){var i,n,t,s,f,a,d,c,u,r,l,p=I(document.body),o=I("#wpcontent"),g=I("#post-body-content"),e=I("#title"),h=I("#content"),m=I(document.createElement("DIV")),w=I("#edit-slug-box"),H=w.find("a").add(w.find("button")).add(w.find("input")),b=I("#adminmenuwrap"),v=(I(),I(),"on"===F.getUserSetting("editor_expand","on")),x=!!v&&"on"===F.getUserSetting("post_dfw"),y=0,T=0,B=20;function C(){(s=g.offset()).right=s.left+g.outerWidth(),s.bottom=s.top+g.outerHeight()}function S(){v||(v=!0,M.trigger("dfw-activate"),h.on("keydown.focus-shortcut",Y))}function O(){v&&(E(),v=!1,M.trigger("dfw-deactivate"),h.off("keydown.focus-shortcut"))}function z(){!x&&v&&(x=!0,h.on("keydown.focus",k),e.add(h).on("blur.focus",W),k(),F.setUserSetting("post_dfw","on"),M.trigger("dfw-on"))}function E(){x&&(x=!1,e.add(h).off(".focus"),A(),g.off(".focus"),F.setUserSetting("post_dfw","off"),M.trigger("dfw-off"))}function _(){(x?E:z)()}function k(t){var e,o=t&&t.keyCode;F.navigator.platform&&(e=-1s.bottom+B)&&A(),c=t})}).on("mouseleave.focus",function(){f=a=null,y=T=0,L.off("scroll.focus")}).on("mousemove.focus",function(t){var e=t.clientX,o=t.clientY,i=F.pageYOffset,t=F.pageXOffset;if(f&&a&&(e!==f||o!==a))if(o<=a&&os.bottom-i||e<=f&&es.right-t){if(y+=Math.abs(f-e),T+=Math.abs(a-o),(o<=s.top-B-i||o>=s.bottom+B-i||e<=s.left-B-t||e>=s.right+B-t)&&(10Y&&(i.style.height=i.scrollHeight+"px"),void 0!==t&&F.scrollTo(t,e),i.scrollHeight=p-D.toolsHeight-D.adminBarHeight&&e<=p-D.toolsHeight-D.adminBarHeight+l-n?(O=!0,m.css({position:"fixed",top:D.adminBarHeight,width:f}),i&&y.length&&y.css({position:"fixed",top:D.adminBarHeight+D.toolsHeight,width:f-2-(i?0:d.outerWidth()-d.width())}),d.css({position:"fixed",top:D.adminBarHeight+D.toolsHeight+D.menuBarHeight,width:f-2-(i?0:d.outerWidth()-d.width())})):(O||o)&&(e<=p-D.toolsHeight-D.adminBarHeight?(O=!1,m.css({position:"absolute",top:0,width:f}),i&&y.length&&y.css({position:"absolute",top:0,width:f-2}),d.css({position:"absolute",top:D.menuBarHeight,width:f-2-(i?0:d.outerWidth()-d.width())})):e>=p-D.toolsHeight-D.adminBarHeight+l-n&&(O=!1,m.css({position:"absolute",top:l-n,width:f}),i&&y.length&&y.css({position:"absolute",top:l-n,width:f-2}),d.css({position:"absolute",top:l-n+D.menuBarHeight,width:f-2-(i?0:d.outerWidth()-d.width())}))),(!z||o&&U)&&e+D.windowHeight<=r+l+D.bottomHeight+D.statusBarHeight+1?t&&0r+l+D.bottomHeight+D.statusBarHeight-1)&&(z=!1,T.attr("style",U?"":"visibility: hidden;"),x.attr("style",""))):o&&(m.css({position:"absolute",top:0,width:f}),i&&y.length&&y.css({position:"absolute",top:0,width:f-2}),d.css({position:"absolute",top:D.menuBarHeight,width:f-2-(i?0:d.outerWidth()-d.width())}),T.attr("style",U?"":"visibility: hidden;"),x.attr("style","")),C.width()<300&&600B.height()+s+120&&D.windowHeightD.windowHeight||k||A?e+K<=s?(B.attr("style",""),k=A=!1):W=e+K&&(k=!0,B.css({position:"fixed",top:K,bottom:""}))):(s-K<=e?B.css({position:"fixed",top:K}):B.attr("style",""),k=A=!1),W=e):(B.attr("style",""),k=A=!1),o&&(h.css({paddingTop:D.toolsHeight}),i?H.css({paddingTop:D.visualTopHeight+D.menuBarHeight}):v.css({marginTop:D.textTopHeight}))))}function f(){P(),p()}function X(t){for(var e=1;e<6;e++)setTimeout(t,500*e)}function t(){F.pageYOffset&&130K&&(A=!0,F.scrollBy(0,-1),p(),F.scrollBy(0,1)),p()}).on("wp-window-resized.editor-expand",function(){g&&!g.isHidden()?g.execCommand("wpAutoResize"):P()}),v.on("focus.editor-expand input.editor-expand propertychange.editor-expand",P),r(),S&&S.pubsub.subscribe("hidden",f),g&&(g.settings.wp_autoresize_on=!0,g.execCommand("wpAutoResizeOn"),g.isHidden()||g.execCommand("wpAutoResize")),g&&!g.isHidden()||P(),p(),M.trigger("editor-expand-on")}function d(){var t=parseInt(F.getUserSetting("ed_size",300),10);t<50?t=50:5e3t&&F.scrollTo(F.pageXOffset,t-D.adminBarHeight),P(),p()},100),p()}function c(){U=!U}"content"===f.id&&((g=f).settings.autoresize_min_height=Y,w=h.find(".mce-toolbar-grp"),H=h.find(".mce-edit-area"),T=h.find(".mce-statusbar"),y=h.find(".mce-menubar"),r=function(){f.on("keyup",o),f.on("show",s),f.on("hide",a),f.on("wp-toolbar-toggle",c),f.on("setcontent wp-autoresize wp-toolbar-toggle",p),f.on("undo redo",i),f.on("FullscreenStateChanged",n),L.off("scroll.mce-float-panels").on("scroll.mce-float-panels",e)},l=function(){f.off("keyup",o),f.off("show",s),f.off("hide",a),f.off("wp-toolbar-toggle",c),f.off("setcontent wp-autoresize wp-toolbar-toggle",p),f.off("undo redo",i),f.off("FullscreenStateChanged",n),L.off("scroll.mce-float-panels")},u.hasClass("wp-editor-expand")&&(r(),X(p)))}),u.hasClass("wp-editor-expand")&&(t(),h.hasClass("html-active")&&X(function(){p(),P()})),I("#adv-settings .editor-expand").show(),I("#editor-expand-toggle").on("change.editor-expand",function(){I(this).prop("checked")?(t(),F.setUserSetting("editor_expand","on")):(d(),F.setUserSetting("editor_expand","off"))}),F.editorExpand={on:t,off:d}}),I(function(){var i,n,t,s,f,d,a,c,u,r,l,p=I(document.body),o=I("#wpcontent"),g=I("#post-body-content"),e=I("#title"),h=I("#content"),m=I(document.createElement("DIV")),w=I("#edit-slug-box"),H=w.find("a").add(w.find("button")).add(w.find("input")),b=I("#adminmenuwrap"),v=(I(),I(),"on"===F.getUserSetting("editor_expand","on")),x=!!v&&"on"===F.getUserSetting("post_dfw"),y=0,T=0,B=20;function C(){(s=g.offset()).right=s.left+g.outerWidth(),s.bottom=s.top+g.outerHeight()}function E(){v||(v=!0,M.trigger("dfw-activate"),h.on("keydown.focus-shortcut",Y))}function S(){v&&(z(),v=!1,M.trigger("dfw-deactivate"),h.off("keydown.focus-shortcut"))}function O(){!x&&v&&(x=!0,h.on("keydown.focus",k),e.add(h).on("blur.focus",W),k(),F.setUserSetting("post_dfw","on"),M.trigger("dfw-on"))}function z(){x&&(x=!1,e.add(h).off(".focus"),A(),g.off(".focus"),F.setUserSetting("post_dfw","off"),M.trigger("dfw-off"))}function _(){(x?z:O)()}function k(t){var e,o=t&&t.keyCode;F.navigator.platform&&(e=-1s.bottom+B)&&A(),c=t})}).on("mouseleave.focus",function(){f=d=null,y=T=0,L.off("scroll.focus")}).on("mousemove.focus",function(t){var e=t.clientX,o=t.clientY,i=F.pageYOffset,t=F.pageXOffset;if(f&&d&&(e!==f||o!==d))if(o<=d&&os.bottom-i||e<=f&&es.right-t){if(y+=Math.abs(f-e),T+=Math.abs(d-o),(o<=s.top-B-i||o>=s.bottom+B-i||e<=s.left-B-t||e>=s.right+B-t)&&(10]*\\s*class="mce_SELRES_start"[^>]+>\\s*'+n+"[^<]*<\\/span>(\\s*)"),i=new RegExp('(\\s*)]*\\s*class="mce_SELRES_end"[^>]+>\\s*'+n+"[^<]*<\\/span>"),a=o.match(e),n=o.match(i);if(!a)return null;e=a.index,o=a[0].length,i=null;return n&&(-1!==a[0].indexOf("data-mce-object-selection")&&(o-=a[1].length),a=n.index,-1!==n[0].indexOf("data-mce-object-selection")&&(a-=n[1].length),i=a-o),{start:e,end:i}}}(g)),g.hide(),f&&(g=g,(f=f)&&(n=g.getElement(),r=f.start,i=f.end||f.start,n.focus&&setTimeout(function(){n.setSelectionRange(r,i),n.blur&&n.blur(),n.focus()},100)))):w.css({display:"",visibility:""}),u.removeClass("tmce-active").addClass("html-active"),w.attr("aria-hidden",!1),window.setUserSetting("editor","html")}}function x(e,t){var n=e.lastIndexOf("<",t-1);if(e.lastIndexOf(">",t)"===e.substr(t,1)){var r=e.substr(n),t=r.match(/<\s*(\/)?(\w+|\!-{2}.*-{2})/);if(!t)return null;e=t[2];return{ltPos:n,gtPos:n+r.indexOf(">")+1,tagType:e,isClosingTag:!!t[1]}}return null}function E(e,t){for(var n=function(e){var t,n=function(e){var t=e.match(/\[+([\w_-])+/g),n=[];if(t)for(var r=0;r)(https?:\\/\\/[^s"]+?)(<\\/p>s*|[\\n\\r][\\n\\r]|$)',"gi");for(;r=c.exec(e);)t={shortcodeName:"url",showAsPlainText:!1,startIndex:r.index,endIndex:r.index+r[0].length,length:r[0].length,urlAtStartOfContent:""===r[1],urlAtEndOfContent:""===r[3]},a.push(t);return a}(e),r=0;r=i.startIndex&&t<=i.endIndex)return i}}function y(e,t){return e("").css({display:"inline-block",width:0,overflow:"hidden","line-height":0}).html(t||"")}function S(e){var t,n=e.$(".mce_SELRES_start").attr("data-mce-bogus",1),r=e.$(".mce_SELRES_end").attr("data-mce-bogus",1);n.length&&(e.focus(),r.length?((t=e.getDoc().createRange()).setStartAfter(n[0]),t.setEndBefore(r[0]),e.selection.setRng(t)):e.selection.select(n[0])),e.getParam("wp_keep_scroll_position")&&function(e,t){var n,r=e.$(t).offset().top,i=e.$(e.getContentAreaContainer()).offset().top,a=b(e),o=l("#wp-content-editor-tools"),c=0,t=0;o.length&&(c=o.height(),t=o.offset().top);o=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,i+=r,a=o-(c+a);i(?:
|\u00a0|\uFEFF| )*<\/p>/g,"

 

")}function $(e){var t="blockquote|ul|ol|li|dl|dt|dd|table|thead|tbody|tfoot|tr|th|td|h[1-6]|fieldset|figure",n=t+"|div|p",r=t+"|pre",i=!1,t=!1,a=[];return e?(-1!==(e=-1!==e.indexOf("]*>[\s\S]*?<\/\1>/g,function(e){return a.push(e),""}):e).indexOf("]*>[\s\S]+?<\/pre>/g,function(e){return(e=(e=e.replace(/
(\r\n|\n)?/g,"")).replace(/<\/?p( [^>]*)?>(\r\n|\n)?/g,"")).replace(/\r?\n/g,"")})),-1!==e.indexOf("[caption")&&(t=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(e){return e.replace(/]*)>/g,"").replace(/[\r\n\t]+/,"")})),e=(e=(e=(e=(e=-1!==(e=-1!==(e=-1!==(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(new RegExp("\\s*\\s*","g"),"\n")).replace(new RegExp("\\s*<((?:"+n+")(?: [^>]*)?)>","g"),"\n<$1>")).replace(/(

]+>.*?)<\/p>/g,"$1")).replace(/]*)?>\s*

/gi,"\n\n")).replace(/\s*

/gi,"")).replace(/\s*<\/p>\s*/gi,"\n\n")).replace(/\n[\s\u00a0]+\n/g,"\n\n")).replace(/(\s*)
\s*/gi,function(e,t){return t&&-1!==t.indexOf("\n")?"\n\n":"\n"})).replace(/\s*

\s*/g,"
\n")).replace(/\s*\[caption([^\[]+)\[\/caption\]\s*/gi,"\n\n[caption$1[/caption]\n\n")).replace(/caption\]\n\n+\[caption/g,"caption]\n\n[caption")).replace(new RegExp("\\s*<((?:"+r+")(?: [^>]*)?)\\s*>","g"),"\n<$1>")).replace(new RegExp("\\s*\\s*","g"),"\n")).replace(/<((li|dt|dd)[^>]*)>/g," \t<$1>")).indexOf("/g,"\n"):e).indexOf("]*)?>\s*/g,"\n\n\n\n"):e).indexOf("/g,function(e){return e.replace(/[\r\n]+/g,"")}):e).replace(/<\/p#>/g,"

\n")).replace(/\s*(

]+>[\s\S]*?<\/p>)/g,"\n$1")).replace(/^\s+/,"")).replace(/[\s\u00a0]+$/,""),i&&(e=e.replace(//g,"\n")),t&&(e=e.replace(/]*)>/g,"")),a.length?e.replace(//g,function(){return a.shift()}):e):""}function r(e){var t=!1,n=!1,r="table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary";return-1===(e=(e=-1!==(e=e.replace(/\r\n|\r/g,"\n")).indexOf("/g,function(e){return e.replace(/\n+/g,"")}):e).replace(/<[^<>]+>/g,function(e){return e.replace(/[\n\t ]+/g," ")})).indexOf("]*>[\s\S]*?<\/\1>/g,function(e){return e.replace(/\n/g,"")})),-1!==(e=-1!==e.indexOf("]*>)/g,"$1")).replace(/<\/figcaption>\s*/g,""):e).indexOf("[caption")&&(n=!0,e=e.replace(/\[caption[\s\S]+?\[\/caption\]/g,function(e){return(e=(e=e.replace(/]*)>/g,"")).replace(/<[^<>]+>/g,function(e){return e.replace(/[\n\t ]+/," ")})).replace(/\s*\n\s*/g,"")})),e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e+="\n\n").replace(/
\s*
/gi,"\n\n")).replace(new RegExp("(<(?:"+r+")(?: [^>]*)?>)","gi"),"\n\n$1")).replace(new RegExp("()","gi"),"$1\n\n")).replace(/]*)?>/gi,"\n\n")).replace(/\s*")).replace(/\n\s*\n+/g,"\n\n")).replace(/([\s\S]+?)\n\n/g,"

$1

\n")).replace(/

\s*?<\/p>/gi,"")).replace(new RegExp("

\\s*(]*)?>)\\s*

","gi"),"$1")).replace(/

(/gi,"$1")).replace(/

\s*]*)>/gi,"

")).replace(/<\/blockquote>\s*<\/p>/gi,"

")).replace(new RegExp("

\\s*(]*)?>)","gi"),"$1")).replace(new RegExp("(]*)?>)\\s*

","gi"),"$1")).replace(/(]*>)\s*\n/gi,"$1")).replace(/\s*\n/g,"
\n")).replace(new RegExp("(]*>)\\s*
","gi"),"$1")).replace(/
(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi,"$1")).replace(/(?:

|
)*\s*\[caption([^\[]+)\[\/caption\]\s*(?:<\/p>|
)*/gi,"[caption$1[/caption]")).replace(/(<(?:div|th|td|form|fieldset|dd)[^>]*>)(.*?)<\/p>/g,function(e,t,n){return n.match(/]*)?>/)?e:t+"

"+n+"

"}),t&&(e=e.replace(//g,"\n")),e=n?e.replace(/]*)>/g,""):e}function a(e){e={o:t,data:e,unfiltered:e};return l&&l("body").trigger("beforePreWpautop",[e]),e.data=$(e.data),l&&l("body").trigger("afterPreWpautop",[e]),e.data}function o(e){e={o:t,data:e,unfiltered:e};return l&&l("body").trigger("beforeWpautop",[e]),e.data=r(e.data),l&&l("body").trigger("afterWpautop",[e]),e.data}return l(document).on("tinymce-editor-init.keep-scroll-position",function(e,t){t.$(".mce_SELRES_start").length&&S(t)}),l?l(e):document.addEventListener?(document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1)):window.attachEvent&&(window.attachEvent("onload",e),document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&e()})),g.editor.autop=o,g.editor.removep=a,t={go:n,wpautop:o,pre_wpautop:a,_wp_Autop:r,_wp_Nop:$}},g.editor.initialize=function(e,t){var n,r,i,a,o,c,p,s,d;l&&e&&g.editor.getDefaultSettings&&(d=g.editor.getDefaultSettings(),(t=t||{tinymce:!0}).tinymce&&t.quicktags&&(r=l("#"+e),i=l("
").attr({class:"wp-core-ui wp-editor-wrap tmce-active",id:"wp-"+e+"-wrap"}),a=l('
'),o=l("