Form

JSON Editor

A JSON editor is a text area where users can enter and edit data in JSON format.

View source

Props

NameTypeDefaultDescription
classNamestring
CSS classes to add on the editor
collapsibleIdstring
If rendered inside a Collapsible component, you need to specify the collapsible id otherwise the editor might not be showing its content properly
containerClassesstring[]
CSS classes to add on the container element
defaultValuestring
initial value of the component
errorMessagestring
Error to display when there is an error parsing the JSON
idstring
The unique identifier that will be used to retrieve the value from the PlasmaState
onChange(json: string, inError: boolean) => void
A callback function executed when the content of the editor changes
  • codeThe content of the editor after the change
  • inErrorWheter there was an error while parsing the JSON
optionsEditorConfiguration
Additional editor options
readOnlyboolean
When true, the content of the editor will not be editable
valuestring
The text value of the JSON editor

Examples

No guidelines exist for JSONEditorConnected yet.

Create guidelines