pydanny / django-wysiwyg

A Django application for making Django textareas rich text editors. Certainly as a template tag and possibly as a form widget.
http://django-wysiwyg.readthedocs.org
MIT License
465 stars 63 forks source link

Uncaught TypeError: editor.destroyEditor is not a function #51

Closed ayeowch closed 9 years ago

ayeowch commented 9 years ago

In https://github.com/pydanny/django-wysiwyg/blob/fc20980dbdb94d6b5e6a3098b112a46406265b8d/django_wysiwyg/templates/django_wysiwyg/redactor/includes.html#L36

I am getting this error: editor.destroyEditor is not a function

Changing that line to editor.remove() seems to resolve it? I am using Redactor v10.0.9 We still need to save the HTML somehow, similar to https://github.com/pydanny/django-wysiwyg/blob/master/django_wysiwyg/templates/django_wysiwyg/tinymce/includes.html#L51

ayeowch commented 9 years ago

From http://imperavi.com/redactor/docs/api/core/#api-destroy, editor.redactor('core.destroy') looks like the correct replacement for editor.destroyEditor().

pydanny commented 9 years ago

Released as 0.7.1: https://pypi.python.org/pypi/django-wysiwyg