From 55645e9dd558c967af3f4e31fa5221c5458e82ba Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 25 Apr 2018 12:46:50 +0100 Subject: [PATCH] Koenig - Increase undo depth to 50 refs https://github.com/TryGhost/Ghost/issues/9505 --- .../admin/lib/koenig-editor/addon/components/koenig-editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js index 1b4a610199..1de7d262f5 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-editor.js @@ -22,6 +22,8 @@ import {copy} from '@ember/object/internals'; import {getContentFromPasteEvent} from 'mobiledoc-kit/utils/parse-utils'; import {run} from '@ember/runloop'; +const UNDO_DEPTH = 50; + export const ADD_CARD_HOOK = 'addComponent'; export const REMOVE_CARD_HOOK = 'removeComponent'; @@ -184,6 +186,7 @@ export default Component.extend({ let editorOptions = this.get('editorOptions'); editorOptions.mobiledoc = mobiledoc; editorOptions.showLinkTooltips = false; + editorOptions.undoDepth = UNDO_DEPTH; let componentHooks = { // triggered when a card section is added to the mobiledoc