Use editor.store.getSnapshot() and editor.store.loadSnapshot() to save and restore the editor's contents.

Controlling the editorCanvas events