From 90b6416ab0d1f8b123b25668c172d7dc44f10b15 Mon Sep 17 00:00:00 2001 From: Philipp Keck Date: Wed, 30 Jun 2021 22:24:38 +0200 Subject: [PATCH] Add keyboard shortcuts for inserting lists See also the feature request at https://github.com/tinymce/tinymce/issues/6700. Tested manually, it works. --- .../app-desktop/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx b/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx index b387b92ae68..f5d0df4bc8d 100644 --- a/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx +++ b/packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/TinyMCE.tsx @@ -734,6 +734,10 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => { }); } + editor.addShortcut('Meta+Shift+7', '', () => editor.execCommand('InsertOrderedList')); + editor.addShortcut('Meta+Shift+8', '', () => editor.execCommand('InsertUnorderedList')); + editor.addShortcut('Meta+Shift+9', '', () => editor.execCommand('InsertJoplinChecklist')); + // setupContextMenu(editor); // TODO: remove event on unmount?