shaunsephton/django-ckeditor — pull request #82 by ellmetha (2013-11-16 18:44:28+00:00)
Title: Init the editor when the DOM is fully loaded if CKEDITOR is not defined

In the CKEditorWidget template (ckeditor/widget.html), the editor is initialized just after the ``textarea`` tag. This works fine with the Django admin (where jQuery is loaded before the HTML declaration of the Ckeditor widget), but it will not work with non-admin templates where all the JS stuff can be done inside a Django template ``block`` tag at the bottom of the page.

This patch fixes the problem by delaying the replacement of ``textarea`` elements with CKEditor instances if the global ``CKEDITOR`` object is not available (in this case, these operations will be done when the DOM is fully loaded). If ``CKEDITOR`` is available, the replacement process is not delayed (current behavior).