I have an issue with django-ckeditor
, I'm using it with django-pipeline
, everything it's ok when is run locally, but if DEBUG=False
the ckeditor.js used is the compressed one and fails.
This is the issue I get from the developer tools in chrome when I load the admin to render a field that use django-ckeditor
ckeditor.8e9749424093.js:245
Uncaught TypeError: Cannot set property 'dir' of undefined
at Object.d (ckeditor.8e9749424093.js:245)
at f (ckeditor.8e9749424093.js:246)
at Array.C (ckeditor.8e9749424093.js:246)
at w (ckeditor.8e9749424093.js:246)
at ckeditor.8e9749424093.js:247```
The file is present and loaded but something is wrong, seems that the compressing from pipeline breaks it.
I already google this issue, and the only advice I found is from the docs. I also added this code to the template, to be sure to tested all the possible solutions, but nothing changed.
{% extends "admin/base_site.html" %}
{% block extrahead %}
<script>window.CKEDITOR_BASEPATH = '/static/ckeditor/ckeditor/' </script>
{{ block.super }}
{% endblock %}
Any advice?