if(editor)
{
//this one doesn't seem to cause any problems
editor.destroy();
}
editor = CKEDITOR.replace(this,
{
uicolor : "#007dc3"
});
function handleAfterCommandExec(event)
{
//grab the button that was pressed
var commandName = event.data.name;
// check to see if it was the save
if (commandName == 'save')
{
//add ajax call here.
// this one however breaks it
editor.destroy();
}
}
Wed, 12/02/2009 - 19:44
#1

Re: Can't recreate editor after calling destroy
.... if (editor) { editor.destroy(); editor = null; } ....Re: Can't recreate editor after calling destroy