Skip to content

Commit

Permalink
Add keyboard shortcuts for inserting lists
Browse files Browse the repository at this point in the history
See also the feature request at tinymce/tinymce#6700.

Tested manually, it works.
  • Loading branch information
Philipp91 committed Jul 6, 2021
1 parent ed7face commit 90b6416
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 90b6416

Please sign in to comment.