Django-tinymce modern theme

I'm having trouble getting a modern theme to work with django-tinymce. Both simple and advanced themes are displayed correctly, but when I switch to modern theme nothing is displayed and I get a 404 error for / static / tiny _mce / themes / modern / editor_template.js in the console

I am trying to do all this in admin django. The error comes from / static / tiny_mce / tiny_mce.js, which is interesting because nothing is installed in that directory. I am using / static / js / tinymce as my TINYMCE_JS_ROOT

in settings.py. Everything works correctly when switching between simple and advanced theme.

I tried to copy the editor_template.js version to the exact location it is looking for, but I still get a 404. This is like erasing / static / tiny_mce if it exists and replacing it with something, but I can't figure out how / where to get it from.

I am using TinyMCE 4.1.3 installation from http://www.tinymce.com/download/download.php and django 1.6.5

+1


source to share


1 answer


I also struggled with TinyMCE recently. I am using TinyMCE v4 and Django 1.6. I went the route django-tinymce

/ django-flatpages-tinymce

because I was working on another project. Some of them weren't working on this new project. I did some research and decided to just go straight to TinyMCE, no Django apps (like no django-tinymce

or django-flatpages-tinymce

).

This method allows all configuration in Django and can be handled entirely in a call tinymce.init

. I found it much easier than dealing with Django settings files, overriding models, etc. Just find the template you want TinyMCE to animate and add the call there init

.

The example here for a fully functional example really helped me:

http://www.tinymce.com/tryit/full.php

This uses a modern theme ...

I just added this to any template change_form.html

for any model where I need a rich editor. For example, for flatpages:



admin/flatpages/flatpage/change_form.html

      

Or a custom model in the app:

admin/custom_app/model_name/change_form.html

      

I know this is exactly the answer to your question, but I think it is worth thinking about and helping you eventually get what you need.

Also, I should note, it looks like only modern theme is available for TinyMCE v4:

http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x

+2


source







All Articles