kosei-n 2 лет назад
Родитель
Сommit
47bdfabe8f

+ 2 - 0
packages/editor/src/services/codemirror-editor/use-codemirror-editor/use-codemirror-editor.ts

@@ -29,6 +29,8 @@ import { useReplaceText, type ReplaceText } from './utils/replace-text';
 import { useSetCaretLine, type SetCaretLine } from './utils/set-caret-line';
 
 // set new markdownKeymap instead of default one
+// I also bound the deleteMarkupBackward to the backspace key to align with the existing keymap
+// https://github.com/codemirror/lang-markdown/blob/main/src/index.ts#L17
 const markdownKeymap = [
   { key: 'Backspace', run: deleteMarkupBackward },
   { key: 'Enter', run: insertNewlineContinueMarkup },