Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit b537d5c

Browse files
myan9starpit
authored andcommitted
fix(plugins/plugin-editor): Editor component should be readOnly for non-files
Fixes #3641
1 parent 24d074f commit b537d5c

File tree

1 file changed

+1
-1
lines changed
  • plugins/plugin-editor/src/view/components

1 file changed

+1
-1
lines changed

plugins/plugin-editor/src/view/components/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export default class Editor extends React.PureComponent<Props, State> {
165165
// here we instantiate an editor widget
166166
const providedOptions = {
167167
value: props.content.content,
168-
readOnly: props.readOnly || false,
168+
readOnly: props.readOnly || !isFile(props.response) || false,
169169
language: props.content.contentType ? language(props.content.contentType) : undefined
170170
}
171171
const options = Object.assign(defaultMonacoOptions(providedOptions), providedOptions)

0 commit comments

Comments
 (0)