I'm having some trouble cleaning up CKEditors and creating new ones.
I have some html that is dynamically loaded into a div. One of the div's is turned into a CKEditor programmatically using CKEDITOR.inline(element);
At some point the DOM for this div is destroyed, but the CKEDITOR instance is still around.
When this html is re-loaded I attempt to delete the CKEDITOR instance attached the old DOM element using: CKEDITOR.instances[element].destroy(); Then I create a new instance of CKEDITOR using CKEDITOR.inline(element), which is the same element used previously.
Whenever I do this. I get errors in the Javascript console.