0 results found

Load TinyMCE crossdomain

Contribute to this page

Please note that it is not possible to load TinyMCE crossdomain, only crosssubdomain.

As of TinyMCE 3.2.2 you will have to set the document.domain value by hand. This since other scripts on the page might change this value or need it to be set to something other that the one TinyMCE used to change to automatically. Our focus is to be a good citizen and not mess with other scripts on the page and the old logic was doing things to a global value that we shouldn't be doing.


It's a fairly easy procedure to set the document domain value. Simply add it to before the tinyMCE.init call on your page.

document.domain = 'mydomain.com';

And then change the value in: tiny_mce_popup.js to:

document.domain = 'mydomain.com';

This will enable the script to be loaded between two sub domains. For example www.mydomain.com can load TinyMCE from scripts.mydomain.com using the above method. We are currently working on a CDN version that will be able to load TinyMCE from any domain.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.