Files
sean 0e8a8b3028
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-17 16:15:01 -05:00

1 line
5.5 KiB
JavaScript

tinymce.ThemeManager.add("modern",function(x){function C(){function c(f){var e,h=[];if(f){return k(f.split(/[ ,]/),function(l){function m(){var o=x.selection;"bullist"==i&&o.selectorChanged("ul > li",function(u,E){for(var s,t=E.parents.length;t--&&(s=E.parents[t].nodeName,"OL"!=s&&"UL"!=s);){}l.active("UL"==s)}),"numlist"==i&&o.selectorChanged("ol > li",function(u,E){for(var s,t=E.parents.length;t--&&(s=E.parents[t].nodeName,"OL"!=s&&"UL"!=s);){}l.active("OL"==s)}),l.settings.stateSelector&&o.selectorChanged(l.settings.stateSelector,function(n){l.active(n)},!0),l.settings.disabledStateSelector&&o.selectorChanged(l.settings.disabledStateSelector,function(n){l.disabled(n)})}var i;"|"==l?e=null:B.has(l)?(l={type:l},z.toolbar_items_size&&(l.size=z.toolbar_items_size),h.push(l),e=null):(e||(e={type:"buttongroup",items:[]},h.push(e)),x.buttons[l]&&(i=l,l=x.buttons[i],l.type=l.type||"button",z.toolbar_items_size&&(l.size=z.toolbar_items_size),l=B.create(l),e.items.push(l),x.initialized?m():x.on("init",m)))}),d.push({type:"toolbar",layout:"flow",items:h}),!0}}for(var d=[],a=1;10>a&&c(z["toolbar"+a]);a++){}return d.length||c(z.toolbar||v),d}function j(){function f(a){var i;return"|"==a?{text:"|"}:i=x.menuItems[a]}function E(K){var G,I,F,J,H;if(H=tinymce.makeMap((z.removed_menuitems||"").split(/[ ,]/)),z.menu?(I=z.menu[K],J=!0):I=w[K],I){G={text:I.title},F=[],k((I.items||"").split(/[ ,]/),function(a){var i=f(a);i&&!H[a]&&F.push(f(a))}),J||k(x.menuItems,function(a){a.context==K&&("before"==a.separator&&F.push({text:"|"}),a.prependToContext?F.unshift(a):F.push(a),"after"==a.separator&&F.push({text:"|"}))});for(var t=0;t<F.length;t++){"|"==F[t].text&&(0===t||t==F.length-1)&&F.splice(t,1)}if(G.menu=F,!G.menu.length){return null}}return G}var e,m=[],d=[];if(z.menu){for(e in z.menu){d.push(e)}}else{for(e in w){d.push(e)}}for(var u=z.menubar?z.menubar.split(/[ ,]/):d,h=0;h<u.length;h++){var c=u[h];c=E(c),c&&m.push(c)}return m}function q(a){function c(d){var f=a.find(d)[0];f&&f.focus()}x.shortcuts.add("Alt+F9","",function(){c("menubar")}),x.shortcuts.add("Alt+F10","",function(){c("toolbar")}),x.shortcuts.add("Alt+F11","",function(){c("elementpath")}),a.on("cancel",function(){x.focus()})}function b(e,m){function d(a){return{width:a.clientWidth,height:a.clientHeight}}var h,c,l,f;h=x.getContainer(),c=x.getContentAreaContainer().firstChild,l=d(h),f=d(c),e=Math.max(z.min_width||100,e),m=Math.max(z.min_height||100,m),e=Math.min(z.max_width||65535,e),m=Math.min(z.max_height||65535,m),y.css(h,"width",e+(l.width-f.width)),y.css(c,"width",e),y.css(c,"height",m),x.fire("ResizeEditor")}function A(c,d){var a=x.getContentAreaContainer();p.resizeTo(a.clientWidth+c,a.clientHeight+d)}function g(){function h(){c&&c.moveRel&&c.visible()&&!c._fixed&&c.moveRel(x.getBody(),["tl-bl","bl-tl"])}function d(){c&&(c.show(),h(),y.addClass(x.getBody(),"mce-edit-focus"))}function l(){c&&(c.hide(),y.removeClass(x.getBody(),"mce-edit-focus"))}function e(){return c?(c.visible()||d(),void 0):(c=p.panel=B.create({type:i?"panel":"floatpanel",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",autohide:!1,autofix:!0,fixed:!!i,border:1,items:[z.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:j()},z.toolbar===!1?null:{type:"panel",name:"toolbar",layout:"stack",items:C()}]}),c.renderTo(i||document.body).reflow(),q(c),d(),x.on("nodeChange",h),x.on("activate",d),x.on("deactivate",l),void 0)}var c,i;return z.fixed_toolbar_container&&(i=y.select(z.fixed_toolbar_container)[0]),z.content_editable=!0,x.on("focus",e),x.on("blur",l),x.on("remove",function(){c&&(c.remove(),c=null)}),{}}function D(d){var f,e,c;return f=p.panel=B.create({type:"panel",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[z.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:j()},z.toolbar===!1?null:{type:"panel",layout:"stack",items:C()},{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),z.resize!==!1&&(e={type:"resizehandle",direction:z.resize,onResizeStart:function(){var a=x.getContentAreaContainer().firstChild;c={width:a.clientWidth,height:a.clientHeight}},onResize:function(a){b(c.width+a.deltaX,c.height+a.deltaY)}}),z.statusbar!==!1&&f.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",items:[{type:"elementpath"},e]}),f.renderBefore(d.targetNode).reflow(),z.width&&tinymce.DOM.setStyle(f.getEl(),"width",z.width),x.on("remove",function(){f.remove(),f=null}),q(f),{iframeContainer:f.find("#iframe")[0].getEl(),editorContainer:f.getEl()}}var p=this,z=x.settings,B=tinymce.ui.Factory,k=tinymce.each,y=tinymce.DOM,w={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},v="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";p.renderUI=function(a){var c=z.skin!==!1?z.skin||"lightgray":!1;return c&&(tinymce.Env.documentMode<=7?tinymce.DOM.loadCSS(tinymce.baseURL+"/skins/"+c+"/skin.ie7.min.css"):tinymce.DOM.loadCSS(tinymce.baseURL+"/skins/"+c+"/skin.min.css"),x.contentCSS.push(tinymce.baseURL+"/skins/"+c+"/content"+(x.inline?".inline":"")+".min.css")),x.on("ProgressState",function(d){p.throbber=p.throbber||new tinymce.ui.Throbber(p.panel.getEl("body")),d.state?p.throbber.show(d.time):p.throbber.hide()}),z.inline?g(a):D(a)},p.resizeTo=b,p.resizeBy=A});