Using the TinyMCE HTML editor popup with S3

920 views
Skip to first unread message

Brent

unread,
May 30, 2013, 11:31:46 PM5/30/13
to django-g...@googlegroups.com
Hi all,

I'm running into an issue getting the TinyMCE HTML popup editor working in production when serving static files via Amazon S3. Everything else seems to work, except the HTML popup editor.

Relavent library versions ...

Django==1.5.1
django-storages==1.1.4

My TinyMCE setup.js file ...

tinyMCE.init({
    mode : "specific_textareas",
    editor_selector : "RichTextField",
    theme : "advanced",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,undo,redo,|,cleanup,|,formatselect,bullist,numlist,|,code,",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : ""
});

Other similar threads that I've bookmarked to try and find an answer ...


The error I'm getting in the browser console when I click on the "html" icon to open the editor, with domains anonymized ...

Blocked a frame with origin "http://mybucket.s3.amazonaws.com" from accessing a frame with origin "http://www.mydomain.com". Protocols, domains, and ports must match. mybucket.s3.amazonaws.com/static/grappelli/tinymce/jscripts/tiny_mce/tiny_mce_popup.js:5

I'm wondering if anyone else has ran across this before and has an easy solution. If anyone finds solution it might be good to add it to the Gjango Grappelli docs.


Brent

unread,
May 30, 2013, 11:47:43 PM5/30/13
to django-g...@googlegroups.com
I tried the suggestion found here and ...

Added `document.domain = "mymainsite.com";` to the top of the following files ...


Still doesn't work ... I am getting a new error in the console of the popup which is ...

Uncaught Error: SecurityError: DOM Exception 18 tiny_mce_popup.js:3
Uncaught TypeError: Cannot call method 'requireLangPack' of undefined source_editor.js:1

I'm using Chrome Version 27.0.1453.93.
Reply all
Reply to author
Forward
0 new messages