Thursday 2 October 2014

Remove instance of CKEDITOR


I was implementing CKEditor with jQuery so that I can load data dynamically and allow the user to edit using CKEditor. I quickly ran into the issue of the editor not showing up after the first display.
The problem was there of the instance of CKEDITOR.
before submitting the ajax form the instance should be destroyed to make changes effect.
I resolved it using 3 lines of code.
if(CKEDITOR.instances['editor'])
                {
                    CKEDITOR.instances['editor'].destroy();
                }
 

No comments:

Post a Comment