1👍
As it turns out, the error was in settings.py. The tinymce location needs to be set like this:
TINYMCE_JS_ROOT = "articles/build/lib/node_modules/tinymce"
TINYMCE_JS_URL = os.path.join(TINYMCE_JS_ROOT, "tinymce.js")
0👍
From django-tinymce docs:
In your own templates containing a TinyMCE widget you must add the following to the HTML HEAD section (assuming you named your form ‘form’):
<head>
...
{{ form.media }}
</head>
Try {{ articleform.media }}
- Updating template view with error message in django
- JsonResponse doesn't return data in template
- Building an API
0👍
Is jQuery available? I added adding your ArticleSubmitView into my working tinymce project, without your tinymce config, and I got an error that jQuery was not defined. When I added a script tag for jQuery above your {% block extra_head_stuff %}
tag in base.html, the tinymce editor showed up.
Note that this is with the following, default settings:
TINYMCE_SPELLCHECKER = False
TINYMCE_COMPRESSOR = True
TINYMCE_DEFAULT_CONFIG = {
'theme': "advanced",
'theme_advanced_buttons3_add': "|,spellchecker",
}
Using your settings, I get an error that tinymce.min.js is not found (though this may be due to me not copying over your static setup).
- Invalid URL pattern using Django with Mezzanine
- Django KeyError when trying to format foreignkey
- Filter objects that exist in the Foreign Key relationship