Skip to content

Commit

Permalink
fix: make the JSON editor readonly truly readonly
Browse files Browse the repository at this point in the history
Closes #1107
  • Loading branch information
Skaiir committed Mar 27, 2024
1 parent 98d0c36 commit 8bf898a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/form-js-playground/src/components/JSONEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ export function JSONEditor(options = {}) {
autocompletionExtension(),
keymap.of([ indentWithTab ]),
editorPlaceholder ? placeholder(editorPlaceholder) : [],
EditorState.readOnly.of(readonly),
EditorView.updateListener.of(update => {
if (update.docChanged) {
emitter.emit('changed', { value: update.state.doc.toString() });
}
}),
EditorView.editable.of(!readonly),
EditorView.contentAttributes.of(contentAttributes)
];

Expand Down

0 comments on commit 8bf898a

Please sign in to comment.