diff --git a/src/components/Editor/MarkdownEditor.tsx b/src/components/Editor/MarkdownEditor.tsx index 72c2f121..64c40a36 100644 --- a/src/components/Editor/MarkdownEditor.tsx +++ b/src/components/Editor/MarkdownEditor.tsx @@ -153,6 +153,11 @@ export function MarkdownEditor({ }); return true; }, + keydown: (evt) => { + if (evt.key === "Enter") { + onSubmit(this.cm) + } + }, blur: () => { if (Platform.isMobile) { view.contentEl.removeClass('is-mobile-editing'); @@ -191,7 +196,7 @@ export function MarkdownEditor({ keymap.of([ { key: 'Enter', - run: makeEnterHandler(false, false), + run: (_: EditorView) => true, shift: makeEnterHandler(false, true), preventDefault: true, },