fix(frontend): readOnly permits codemirror select text

Signed-off-by: Avinash <avinash.kumar.cs92@gmail.com>
This commit is contained in:
Avinash 2023-06-23 17:17:52 +05:30 committed by Tilman Vatteroth
parent e8c959268a
commit 09aef381c1

View file

@ -154,7 +154,7 @@ export const EditorPane: React.FC<EditorPaneProps> = ({ scrollState, onScroll, o
<MaxLengthWarning /> <MaxLengthWarning />
<ToolBar /> <ToolBar />
<ReactCodeMirror <ReactCodeMirror
editable={updateViewContextExtension !== null && isSynced && mayEdit} readOnly={updateViewContextExtension === null || !isSynced || !mayEdit}
placeholder={placeholderText} placeholder={placeholderText}
extensions={extensions} extensions={extensions}
width={'100%'} width={'100%'}