@@ -43,16 +43,6 @@ export const CodeMirrorEditor = (props: Props): JSX.Element => {
}, [onChange]);
const { data: codeMirrorEditor } = useCodeMirrorEditorIsolated(editorKey, containerRef.current, cmProps);
- useEffect(() => {
- const extension = keymap.of([
- ...defaultKeymap,
- ]);
-
- const cleanupFunction = codeMirrorEditor?.appendExtensions?.(extension);
- return cleanupFunction;
- }, [codeMirrorEditor]);
useEffect(() => {
if (indentSize == null) {
return;
@@ -51,8 +51,8 @@ export const CodeMirrorEditorMain = (props: Props): JSX.Element => {
}
return true;
},
+ ...defaultKeymap,
]);
const cleanupFunction = codeMirrorEditor?.appendExtensions?.(keymapExtension);