Fix editor formatting

This commit is contained in:
Gregory Schier
2025-01-27 08:17:31 -08:00
parent 229d9c1bd6
commit 93bd437e71

View File

@@ -148,7 +148,7 @@ export const Editor = forwardRef<EditorView | undefined, EditorProps>(function E
disableTabIndent = true;
}
if (format == null) {
if (format == null && !readOnly) {
format =
language === 'json'
? tryFormatJson