I have found the following question (no answer), which matches exactly the problem I have:
CKEditor saves a snapshot of the content on every change. This snapshot is put into a history which is used by the Undo plugin so that when a user presses the Undo button, they are able to return to previous snapshots in the history.
I've got an internal script which changes some content that I want to be removed from the snapshot history in CKEditor. Basically, I want a snapshot before my script starts changing content so that once my script is done changing content, if the user presses the Undo button, it will return them to the snapshot before the script is run and not all of the changes, step-by-step, that the script made.
I would prefer to do this without modifying the Undo plugin. My question is whether there's a way to tell CKEditor to ignore snapshots for the Undo history (maybe binding to the saveSnapshot event?)
CKEditor saves a snapshot of the content on every change. This snapshot is put into a history which is used by the Undo plugin so that when a user presses the Undo button, they are able to return to previous snapshots in the history.
I've got an internal script which changes some content that I want to be removed from the snapshot history in CKEditor. Basically, I want a snapshot before my script starts changing content so that once my script is done changing content, if the user presses the Undo button, it will return them to the snapshot before the script is run and not all of the changes, step-by-step, that the script made.
I would prefer to do this without modifying the Undo plugin. My question is whether there's a way to tell CKEditor to ignore snapshots for the Undo history (maybe binding to the saveSnapshot event?)