Json

The Json type is for a textarea which will be rendered as a json editor.

Settings

Name Type Default Required
integer 30
integer 5
boolean false
boolean false
boolean true

cols

cols
Type
integer
Default
30

Size for the input field. Min value is 10 and max value is 50.

rows

rows
Type
integer
Default
5

Amount of rows for the textarea. Min value is 1 and max value is 20.

required

required
Type
boolean
Default
false

If set, the Json textarea needs to be filled.

readOnly

readOnly
Type
boolean
Default
false

If set, the Json textarea is read only.

enableCodeEditor

enableCodeEditor
Type
boolean
Default
true

In case enableCodeEditor is set to true, which is the default and the system extension t3editor is installed and active, the JSON value is rendered in the corresponding code editor. Otherwise it is rendered in a standard textarea HTML element.

Examples

Minimal

name: example/json
fields:
  - identifier: json
    type: Json
Copied!

Advanced / use case

name: example/json
fields:
  - identifier: json
    type: Json
    required: true
    readOnly: true
    cols: 50
    rows: 10
    enableCodeEditor: false
    placeholder: '[{"foo": "bar"}]'
Copied!