So I have this code to create an editor with a shared toolbar:
then I have this code to destroy it, from a button click:
However, once the destroy is executed, I get this error:
which may probably mean that a toolbar exists without its editor. SO I was wondering how I can destroy the shared toolbar along with the editor too?
var editor = $('#' + elementId).ckeditor({
sharedSpaces:{
top:'SharedToolbar'
},
toolbar:[
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote']
],
removePlugins : 'maximize,resize,elementspath'
});then I have this code to destroy it, from a button click:
var instance = CKEDITOR.instances[elementId];
if (instance) {
instance.destroy();
container.find('.control_edit').show();
if ($.isEmptyObject(CKEDITOR.instances)){
alert('Rar');
}
}However, once the destroy is executed, I get this error:
i.contentWindow is null
which may probably mean that a toolbar exists without its editor. SO I was wondering how I can destroy the shared toolbar along with the editor too?

Re: CKEditor Destroy Shared Toolbar
config.sharedSpaces = { top : 'topSpace' }; config.removePlugins = 'elementspath,pastetext,resize,showborders,scayt,liststyle';topSpace
editor = CKEDITOR.replace( div, { toolbar : toolbar } );if (editor != null) { editor.destroy(); }