b0y-101 Mini Shell


Current Path : E:/www/chiangmai/media/editors/tinymce/js/
File Upload :
Current File : E:/www/chiangmai/media/editors/tinymce/js/tinymce.min.js

(function(l,c,t,d){"use strict";t.getSize=t.getSize||function(){return{x:t.innerWidth,y:t.innerHeight}};t.jInsertEditorText=function(t,e){c.editors.instances[e].replaceSelection(t)};var e={setupEditors:function(t){t=t||d;var e=c.getOptions?c.getOptions("plg_editor_tinymce",{}):c.optionsStorage.plg_editor_tinymce||{},n=t.querySelectorAll(".js-editor-tinymce");for(var i=0,o=n.length;i<o;i++){var r=n[i].querySelector("textarea");this.setupEditor(r,e)}},setupEditor:function(t,e){var n=t?t.getAttribute("name").replace(/\[\]|\]/g,"").split("[").pop():"default",i=e?e.tinyMCE||{}:{},o=i["default"]||{},r=i[n]?i[n]:o;if(r.joomlaMergeDefaults){r=c.extend(c.extend({},o),r)}else{r=c.extend({},r)}if(t){r.selector=null;r.target=t;var s=tinymce.get(t.id);if(s){s.remove();delete c.editors.instances[t.id]}}if(r.joomlaExtButtons&&r.joomlaExtButtons.names&&r.joomlaExtButtons.names.length){r.toolbar1+=" | "+r.joomlaExtButtons.names.join(" ");var a=r.joomlaExtButtons.script.join(";");r.setupCallbackString=r.setupCallbackString||"";r.setupCallbackString=r.setupCallbackString+";"+a;r.joomlaExtButtons=null}if(r.setupCallbackString&&!r.setup){r.setup=new Function("editor",r.setupCallbackString)}var u=new l.Editor(t.id,r,tinymce.EditorManager);u.render();c.editors.instances[t.id]={getValue:function(){return this.instance.getContent()},setValue:function(t){return this.instance.setContent(t)},getSelection:function(){return this.instance.selection.getContent({format:"text"})},replaceSelection:function(t){return this.instance.execCommand("mceInsertContent",false,t)},id:t.id,instance:u,onSave:function(){if(this.instance.isHidden()){this.instance.show()}return""}};d.getElementById(u.id).form.addEventListener("submit",function(){c.editors.instances[u.targetElm.id].onSave()})}};c.JoomlaTinyMCE=e;d.addEventListener("DOMContentLoaded",function(){c.JoomlaTinyMCE.setupEditors();if(t.jQuery){jQuery(d).on("subform-row-add",function(t,e){c.JoomlaTinyMCE.setupEditors(e)});jQuery(d).on("sortstop",function(t,e){if(e.item[0]){c.JoomlaTinyMCE.setupEditors(e.item[0])}})}})})(tinyMCE,Joomla,window,document);

Copyright © 2019 by b0y-101