TinyMCE plugin, get url to correct tiny_mce_popup.js?



I'm making a tinymce button plugin which opens a popup. I the popup i can reference tiny_mce_popup.js with (just like epi's plugins)

but that loads the tiny_mce_popup.js for tinymce (at least thats the version that tiny_mce_src.js says it is) which is located at path /Util/Editor/tinymce/. I want the file in at /EPiServer/CMS/ (or what ever version of the CMS module i have) which is version 3.5.11.

How can i get the correct url?

Sep 02, 2016 15:00

So, i solved it with my own dependency loading, like this:

        (function () {
            var dependencies = ['/tiny_mce_popup.js', '/utils/form_utils.js'];
            var left = dependencies.length;
            var tinymce = ((!window.frameElement && window.dialogArguments) || opener || parent || top).tinymce;
            for (var i = 0; i < dependencies.length; ++i) {
                var dependency = dependencies[i];
                var script = document.createElement('script');
                script.src = tinymce.baseURL + dependency;
                script.onload = function () {
                    if (--left == 0) {
                        tinyMCEPopup.onInit.add(SimpleImage.init, SimpleImage);

SimpleImage is my "popup controller".

Edited, Sep 02, 2016 15:55
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.