|
@@ -29,6 +29,8 @@ import { useReplaceText, type ReplaceText } from './utils/replace-text';
|
|
|
import { useSetCaretLine, type SetCaretLine } from './utils/set-caret-line';
|
|
import { useSetCaretLine, type SetCaretLine } from './utils/set-caret-line';
|
|
|
|
|
|
|
|
// set new markdownKeymap instead of default one
|
|
// 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 = [
|
|
const markdownKeymap = [
|
|
|
{ key: 'Backspace', run: deleteMarkupBackward },
|
|
{ key: 'Backspace', run: deleteMarkupBackward },
|
|
|
{ key: 'Enter', run: insertNewlineContinueMarkup },
|
|
{ key: 'Enter', run: insertNewlineContinueMarkup },
|