?
avatar PhilETaylor
PhilETaylor
27 Mar 2017

Steps to reproduce the issue

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

Expected result

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

Actual result

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);

System information (as much as possible)

https://github.com/joomla/joomla-cms/edit/staging/media/editors/tinymce/js/tinymce.min.js

avatar PhilETaylor PhilETaylor - open - 27 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 27 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Mar 2017
avatar brianteeman
brianteeman - comment - 27 Mar 2017

see #14194 by @dgt41

avatar C-Lodder
C-Lodder - comment - 27 Mar 2017

PR: #14938

avatar PhilETaylor
PhilETaylor - comment - 27 Mar 2017

see #14194 by @dgt41

Seems to be unconnected completely to this issue - maybe you meant to post on #14935 - either way, as #14194 is already merged in Feb 2017, and this problem (in #14935) still exists, it is still a valid issue to raise.

avatar PhilETaylor PhilETaylor - change - 27 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-27 15:57:14
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 27 Mar 2017

Add a Comment

Login with GitHub to post a comment