How to properly destroy CKEditor instance?

I had this problem. What a pain.

To properly destroy the editor instance, try

if (CKEDITOR.instances.myInstanceName) CKEDITOR.instances.myInstanceName.destroy();

From the documentation here

I solved the missing content issue by assigning the contents of the editor to a hidden field prior to postback. I’m using ASP.Net, but it should work universally.

in the client-side click handler of the submit button, call

if (CKEDITOR.instances.myInstanceName)
    document.getElementById('hiddenField').value = CKEDITOR.instances.getData();

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)