Search code examples
djangoamazon-s3tinymceamazon-cloudfrontdjango-tinymce

TinyMCE popups not loading when using S3 and setting document.domain


My main domain is 'btaylorweb.com'. I have a subdomain 'static.btaylorweb.com' that uses a CNAME to point to my CloudFront URL.

TinyMCE is loading just fine from S3, however, my popups are blank. I've set the domain as such:

document.domain = 'btaylorweb.com';

in tiny_mce_popup.js and in tiny_mce.js, but that's still not working. Can anyone please point out what I'm doing wrong?


Solution

  • I ended up leveraging the Image plugin in DjangoCMS, which can be used in conjunction with django-storages to push files directly to the S3 bucket. It works, but the Image plugin isn't quite as nice as seeing the images inline with the rest of the content.