TinyMCE is loading lang / plugins / theme from the wrong directory

I'm having problems with TinyMCE. When he searches for the language, theme and plugins, he should search in the directory where the base script files are located. however, instead, it uses the currently loaded page as the root for the search. I look at the loadScripts function in the src file, but changing the path has no meaningful effect.

Here is the unmodified loadScripts function for your overview:

// Load scripts
        function loadScripts() {
            if (s.language)
                sl.add(tinymce.baseURL + '/langs/' + s.language + '.js');

            if (s.theme && s.theme.charAt(0) != '-' && !ThemeManager.urls[s.theme])
                ThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js');

            each(explode(s.plugins), function(p) {
                if (p && p.charAt(0) != '-' && !PluginManager.urls[p]) {
                    // Skip safari plugin for other browsers
                    if (!isWebKit && p == 'safari')
                        return;

                    PluginManager.load(p, 'plugins/' + p + '/editor_plugin' + tinymce.suffix + '.js');
                }
            });

            // Init when que is loaded
            sl.loadQueue(function() {
                if (!t.removed)
                    t.init();
            });
        };

        loadScripts();
    }
+3
source share
1 answer

I had / had the same problem with the "one page" application I'm working on. JS to download JS for tinymce is in a different directory, and that gave me the same problem you were talking about.

, , .

  window.tinyMCEPreInit = {
      suffix : '_1',
      base : '/static/js/plugins/tiny_mce', // your path to tinyMCE
      query : 'something'
  };

"base" , .

, jquery. , jQuery- AND tinymce, jquery script_src, , . .

, . , JS CSS , . , , tinymce , lang template css , 404s. lang , "en_1", "_1" - cacehbuster. , , tinymce.suffix arg.

, . 6 , .

+7

All Articles