view
https://github.com/joomla/joomla-cms/edit/staging/media/editors/tinymce/js/tinymce.min.js
and
https://github.com/joomla/joomla-cms/edit/staging/media/editors/tinymce/js/tinymce.js
It is well known and expected that a file.js and file.min.js are the same content, just with the latter being minimised for size.
Therefore it is expected tinymce.min.js is a minimised version of tinymce.js
The files contain different content (and I don't mean just because one is minimised) The code in the minimised version equates to:
!function (a, b, c, d) {
"use strict";
c.getSize = c.getSize || function () {
return {x: c.innerWidth, y: c.innerHeight}
}, c.jInsertEditorText = function (a, c) {
b.editors.instances[c].replaceSelection(a)
};
var e = {
setupEditors: function (a) {
a = a || d;
for (var c = b.getOptions ? b.getOptions("plg_editor_tinymce", {}) : b.optionsStorage.plg_editor_tinymce || {},
e = a.querySelectorAll(".js-editor-tinymce"), f = 0, g = e.length; f < g; f++) {
var h = e[f].querySelector("textarea");
this.setupEditor(h, c)
}
}, setupEditor: function (c, e) {
var f = c ? c.getAttribute("name").replace(/\[\]|\]/g, "").split("[").pop() : "default",
g = e ? e.tinyMCE || {} : {}, h = g.default || {}, i = g[f] ? g[f] : h;
i = b.extend({}, i), c && (i.selector = null, i.target = c), i.setupCallbackString && !i.setup && (i.setup = new Function("editor", i.setupCallbackString)), console.log(c);
var j = new a.Editor(c.id, i, tinymce.EditorManager);
j.render(), b.editors.instances[c.id] = {
getValue: function () {
return this.instance.getContent()
}, setValue: function (a) {
return this.instance.setContent(a)
}, replaceSelection: function (a) {
return this.instance.execCommand("mceInsertContent", !1, a)
}, id: c.id, instance: j, onSave: function () {
return this.instance.isHidden() && this.instance.show(), ""
}
}, d.getElementById(j.id).form.addEventListener("submit", function () {
b.editors.instances[j.targetElm.id].onSave()
})
}
};
b.JoomlaTinyMCE = e, d.addEventListener("DOMContentLoaded", function () {
b.JoomlaTinyMCE.setupEditors(), c.jQuery && jQuery(d).on("subform-row-add", function (a, c) {
b.JoomlaTinyMCE.setupEditors(c)
})
})
}(tinyMCE, Joomla, window, document);
https://github.com/joomla/joomla-cms/edit/staging/media/editors/tinymce/js/tinymce.min.js
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-27 15:57:14 |
Closed_By | ⇒ | PhilETaylor |
see #14194 by @dgt41