|
|
@@ -14,6 +14,8 @@ import {
|
|
|
getEditorTheme, getKeymap, insertNewlineContinueMarkup, insertNewRowToMarkdownTable, isInTable,
|
|
|
} from '../services-internal';
|
|
|
|
|
|
+import { useKeyBindings, useKeyboardShortcuts, useGetCustomKeyBindings } from './use-editor-shortcuts';
|
|
|
+
|
|
|
|
|
|
export const useEditorSettings = (
|
|
|
codeMirrorEditor?: UseCodeMirrorEditor,
|
|
|
@@ -92,5 +94,7 @@ export const useEditorSettings = (
|
|
|
|
|
|
}, [codeMirrorEditor, keymapExtension]);
|
|
|
|
|
|
-
|
|
|
+ const customKeyBindings = useGetCustomKeyBindings(codeMirrorEditor?.view, editorSettings?.keymapMode);
|
|
|
+ const keyBindings = useKeyBindings(codeMirrorEditor?.view, customKeyBindings);
|
|
|
+ useKeyboardShortcuts(codeMirrorEditor, keyBindings);
|
|
|
};
|