1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added ordered/unordered WYSIWYG list shortcuts

Related to #1269
This commit is contained in:
Dan Brown
2022-07-26 16:35:21 +01:00
parent 4fa73be80e
commit 8681c5f613
3 changed files with 21 additions and 5 deletions

View File

@ -166,13 +166,13 @@ function getSetupCallback(options) {
return function(editor) {
editor.on('ExecCommand change input NodeChange ObjectResized', editorChange);
listenForCommonEvents(editor);
registerShortcuts(editor);
listenForDragAndPaste(editor, options);
editor.on('init', () => {
editorChange();
scrollToQueryString(editor);
window.editor = editor;
registerShortcuts(editor);
});
editor.on('PreInit', () => {

View File

@ -16,6 +16,8 @@ export function register(editor) {
editor.shortcuts.add('meta+e', '', ['codeeditor', false, 'pre']);
editor.shortcuts.add('meta+8', '', ['FormatBlock', false, 'code']);
editor.shortcuts.add('meta+shift+E', '', ['FormatBlock', false, 'code']);
editor.shortcuts.add('meta+o', '', 'InsertOrderedList');
editor.shortcuts.add('meta+p', '', 'InsertUnorderedList');
// Save draft shortcut
editor.shortcuts.add('meta+S', '', () => {