TinyMCE loading lang/plugins/theme from incorrect directory
Posted
by
Anonymous
on Stack Overflow
See other posts from Stack Overflow
or by Anonymous
Published on 2011-09-06T19:50:38Z
Indexed on
2012/11/04
23:01 UTC
Read the original article
Hit count: 210
I am having trouble with TinyMCE. When it is searching for the lang, theme, and plugins, it is supposed to look in the directory where the base script files are located. however, instead of doing that, it is using the current loaded page as the root for searching. I am looking at the "loadScripts" function in the src file, but changing the path doesn't seem to provide any meaningful effect.
Here is the unmodified loadScripts function for your review:
// 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();
}
© Stack Overflow or respective owner