In some cases, when you use an app thet provides an own version of jquery, the redactor widget fails to initialize.
The line
$('#textarea').redactor(...)
Throws an exception: Uncaught TypeError: undefined is not a function
You could solve this by ovveriding the change_form.html admin template:
{% extends "admin/change_form.html" %}
{% block extrahead %}{{ block.super }}
<!-- append redactor js to the end of the head segment -->
<script type="text/javascript" src="/static/suit-redactor/redactor/redactor.min.js"></script>
{% endblock %}
The caveat of that is that the js is included in the template twice (and possibly interpreted twice), but it makes things work again.
Or if there is the possibility to tell other apps to abstain from adding its own jquery, you could do that. In my specific example, this is the case for https://github.com/asyncee/django-easy-select2. There you can set the option
SELECT2_USE_BUNDLED_JQUERY = False
The issue is caused because django-admins jquery is loaded before redactor.min.js and the other apps jquery after redactor.min.js, wich overrides that binding.
This is not really a bug, but worth a mention in the docs.
In some cases, when you use an app thet provides an own version of jquery, the redactor widget fails to initialize. The line
Throws an exception:
Uncaught TypeError: undefined is not a function
You could solve this by ovveriding the
change_form.html
admin template:The caveat of that is that the js is included in the template twice (and possibly interpreted twice), but it makes things work again.
Or if there is the possibility to tell other apps to abstain from adding its own jquery, you could do that. In my specific example, this is the case for https://github.com/asyncee/django-easy-select2. There you can set the option
The issue is caused because django-admins jquery is loaded before redactor.min.js and the other apps jquery after redactor.min.js, wich overrides that binding.
This is not really a bug, but worth a mention in the docs.