Skip to content

@sqlrooms/codemirror / JsonCodeMirrorEditorProps

Interface: JsonCodeMirrorEditorProps ​

Extends ​

Properties ​

className? ​

optional className?: string

CSS class name for the editor container

Inherited from ​

CodeMirrorEditorProps.className


readOnly? ​

optional readOnly?: boolean

Whether the editor should be in read-only mode

Inherited from ​

CodeMirrorEditorProps.readOnly


onChange? ​

optional onChange?: (value) => void

Callback when the editor content changes

Parameters ​

ParameterType
valuestring

Returns ​

void

Inherited from ​

CodeMirrorEditorProps.onChange


onMount? ​

optional onMount?: (view) => void

Callback when the editor view is mounted - provides access to EditorView instance

Parameters ​

ParameterType
viewEditorView

Returns ​

void

Inherited from ​

CodeMirrorEditorProps.onMount


onValidate? ​

optional onValidate?: (diagnostics) => void

Callback when lint diagnostics change (validation errors/warnings)

Parameters ​

ParameterType
diagnosticsDiagnostic[]

Returns ​

void

Inherited from ​

CodeMirrorEditorProps.onValidate


options? ​

optional options?: CodeMirrorEditorOptions

Additional configuration options

Inherited from ​

CodeMirrorEditorProps.options


schema? ​

optional schema?: object

The JSON schema to validate against


value? ​

optional value?: string | object

The JSON value to edit - can be a string or an object (will be stringified)


hideGutter? ​

optional hideGutter?: boolean

Whether to hide the gutter (line numbers, fold markers, etc.)