From 9200e22a7e0a8a1b15067bd8f4cc09295879452d Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sat, 21 Oct 2023 21:16:36 +1100 Subject: [PATCH] fix backward delete with previous empty line (#1469) --- src/app/components/editor/keyboard.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/app/components/editor/keyboard.ts b/src/app/components/editor/keyboard.ts index 7031749..2ea2dbe 100644 --- a/src/app/components/editor/keyboard.ts +++ b/src/app/components/editor/keyboard.ts @@ -1,6 +1,6 @@ import { isKeyHotkey } from 'is-hotkey'; import { KeyboardEvent } from 'react'; -import { Editor, Range } from 'slate'; +import { Editor, Element as SlateElement, Range, Transforms } from 'slate'; import { isAnyMarkActive, isBlockActive, removeAllMark, toggleBlock, toggleMark } from './utils'; import { BlockType, MarkType } from './types'; @@ -31,6 +31,9 @@ export const toggleKeyboardShortcut = (editor: Editor, event: KeyboardEvent