开发者

TinyMCE and TinyBrowser Cross SubDomains

开发者 https://www.devze.com 2023-03-23 01:59 出处:网络
I have tinyMCE and tinyBrowser (to upload and manage files) runn开发者_JAVA技巧ing fine on my production server. The files are increasing and I decided to separate tinyBrowser to a different server.

I have tinyMCE and tinyBrowser (to upload and manage files) runn开发者_JAVA技巧ing fine on my production server. The files are increasing and I decided to separate tinyBrowser to a different server.

Now what I am trying to do is to have tinyMCE on the main production server: a.domain.com and call the tinybrowser from a different sub domain say b.domain.com/tinybrowser.php

Tinybrowser is working fine independently but the two are unable to communicate with each other. I understand this is a cross domain issue, but I am unable to solve it. Is there any other alternative I can use to primarily solve the pain point of hosting files on a different server when uploaded using tinyMCE/tinyBrowser

Thanks Sparsh Gupta


You will want to make adjustments in 2 places:

  1. in tiny_mce_popup.js:

    • uncomment //document.domain = 'domain.com';
      (so it looks like):
      document.domain = 'domain.com';
  2. In any places where you have initilized tinyMCE (i.e. called tinyMCE.init({ ..) place: document.domain = 'domain.com';

above:
tinyMCE.init({

so it'll look like:

document.domain = 'domain.com';
tinyMCE.init({
...
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号