1

I'm working with a django form which uses django-tinymce.

I have followed the instructions in django-tinymce.readthedocs.org. This seems to work, however the buttons are not appering properly in firefox or in IE 9. But its working fine in Google Chrome.

I have used following code to create tinyMCE field in forms.py

ticketDesc = forms.CharField(label=u'Description'
                             ,required=False
                             ,widget=TinyMCE(mce_attrs={'menubar':False,'mode' :'textareas'},attrs={'class':'input w98p', 'rows': 5,'cols':50})
                             )

And in my template i load the js files for tinyMCE from Amazon S3.

<script src="{{TINYMCE_JS_URL}}"></script>      

This load the editor in firefox but this is how it appearsenter image description here

Please note the buttons. It appears in some unidentified characters.

However if i change the url of the javascript file to use the one provided by tinyMCE ie;

<script src="//tinymce.cachefly.net/4.0/tinymce.min.js"></script>

Then the editor will appear properly in firefox. Please check the image below.enter image description here

What could be the issue?

I'm using windows 7 and django 1.5.1 and using django's development server. I have used tinyMCE 4.0.2

Nick
  • 1,799
  • 3
  • 23
  • 32

1 Answers1

1

You are running into cross-domain problems when loading TinyMCE over a CDN. We solved this problem by hosting TinyMCE locally through Django (justified by low usage), while still serving all other statics over a CDN.

See also your browsers console, it probably mentions a script to perform cross-domain actions, which have been blocked by the browser.

Bouke
  • 11,768
  • 7
  • 68
  • 102