We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e96c80e commit dfc228cCopy full SHA for dfc228c
resources/views/forms/components/json-input.blade.php
@@ -15,6 +15,7 @@
15
x-init="
16
const config = {
17
mode: {name: 'javascript', json: true},
18
+ readOnly: {{ json_encode($isReadOnly()) }},
19
lineNumbers: {{ json_encode($getHasLineNumbers()) }},
20
lineWrapping: {{ json_encode($getHasLineWrapping()) }},
21
autoCloseBrackets: {{ json_encode($getHasAutoCloseBrackets()) }},
@@ -65,13 +66,15 @@
65
66
{{ $cmId }}.refresh();
67
}, 1);
68
69
+ @if(!$isReadOnly())
70
{{ $cmId }}.on('change', function () {
71
try {
72
state = JSON.parse({{ $cmId }}.getValue())
73
} catch (e) {
74
state = {{ $cmId }}.getValue();
75
}
76
});
77
+ @endif
78
"
79
>
80
<div
0 commit comments