diff --git a/apps/admin-x-design-system/src/global/form/CodeEditorView.tsx b/apps/admin-x-design-system/src/global/form/CodeEditorView.tsx index 207b71bd39..c61bd98c03 100644 --- a/apps/admin-x-design-system/src/global/form/CodeEditorView.tsx +++ b/apps/admin-x-design-system/src/global/form/CodeEditorView.tsx @@ -1,5 +1,5 @@ import {Extension} from '@codemirror/state'; -import CodeMirror, {ReactCodeMirrorProps, ReactCodeMirrorRef} from '@uiw/react-codemirror'; +import CodeMirror, {ReactCodeMirrorProps, ReactCodeMirrorRef, BasicSetupOptions} from '@uiw/react-codemirror'; import clsx from 'clsx'; import React, {FocusEventHandler, forwardRef, useEffect, useId, useRef, useState} from 'react'; import {useFocusContext} from '../../providers/DesignSystemProvider'; @@ -49,6 +49,9 @@ const CodeEditorView = forwardRef(function const sizeRef = useRef(null); const [width, setWidth] = useState(100); const [resolvedExtensions, setResolvedExtensions] = React.useState(null); + const [basicSetup, setBasicSetup] = useState({ + crosshairCursor: false + }); const {setFocusState} = useFocusContext(); const handleFocus: FocusEventHandler = (e) => { @@ -63,6 +66,7 @@ const CodeEditorView = forwardRef(function useEffect(() => { Promise.all(extensions).then(setResolvedExtensions); + setBasicSetup(setup => ({setup, searchKeymap: false})); }, [extensions]); useEffect(() => { @@ -90,6 +94,7 @@ const CodeEditorView = forwardRef(function {resolvedExtensions &&