소스 검색

add more comments

kosei-n 2 년 전
부모
커밋
47bdfabe8f
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      packages/editor/src/services/codemirror-editor/use-codemirror-editor/use-codemirror-editor.ts

+ 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 },