Log in or register to post comments
Last post
helmo̷'s picture
Joined: 24/03/2011
Posts: 90
editor.destroy( true ) not working in inline mode?

Does anybody else have problems destroying an editor instance without making any changes to the document when in inline mode?

I cannot get editor.destroy( true ) to work? I would like everything to be undone if the user presses the ESC-key while editing. When I call editor.destroy( true ) all changes are made :-(

Anna's picture
Joined: 14/12/2010
Posts: 1488
Which CKEditor version do you

Which CKEditor version do you use? Two issues with editor.destroy() have recently been fixed, can you check whether you can reproduce this error on the latest code base? If so, it would be much appreciated if you reported this on our Development site. Thanks!

Documentation Manager, CKSource

See CKEditor 4.x docs, CKEditor 3.x docs, CKFinder docs for help. CKEditor general FAQ is useful, too!
If you think you found a bug in CKEditor, read this!

helmo̷'s picture
Joined: 24/03/2011
Posts: 90
I am using version 4.1. The

I am using version 4.1. The bugs you are referring to are bugs concerning destroying the editor on a mouse-click.

My problem is not that I get an error when destroying the editor instance - it works fine. But all editing done has to be undone when the ESC-key is pressed (sort of like - "I would like to cancel my editing"). The destory method takes an optionakl argument [noUpdate] that I set to "true" - but it is ignored when in inline-mode.

I will try it with the latest version and file it as a bug if still there...

Anna's picture
Joined: 14/12/2010
Posts: 1488
Hi Helmo̷,

Hi Helmo̷,

it will be great if you can check it with the latest editor version and file a report if this turns out to be a bug. Thanks!

Documentation Manager, CKSource

See CKEditor 4.x docs, CKEditor 3.x docs, CKFinder docs for help. CKEditor general FAQ is useful, too!
If you think you found a bug in CKEditor, read this!

adela508's picture
Joined: 06/05/2013
Posts: 15
Helmo,

Helmo,

Did you ever seem to figure out this issue?  I'm having the same problem and I'm running the latest version of the editor.

Adam

helmo̷'s picture
Joined: 24/03/2011
Posts: 90
CKEditor people don't see

CKEditor people don't see this as an error because the destroy([noUpdate]) only undoes editing when in replacing elements. In the case of the inline editor - there is no replacing element as you are editing the actual element.

I do think that the documentation is a little vague on this though... And I would like the option to "undo" editing done. I have tried to save the HTML before the editing and then inserting it again after editing in the case "my user" presses "ESC" - but it hasn't worked (and I have not used that much time looking at the problem...)

If you find a solution to it please post it :-)