Recent searches

in

code_block_options

On this page

Configure the controls to edit a code block.

Appears in

├── _inputs
│   └── *
│       └── Rich Text Input
│           └── options
│               └── code_block_options
└── _editables
    ├── content
    │   └── code_block_options
    └── block
        └── code_block_options

Type

Object

Properties

languageObject#

This key defines the input for a code block's syntax highlighting language.

Appears in: code_block_options, _inputs.*.

Show examplesHide examples

In this example, we have configured the language input with a custom label, comment, and a limited set of selectable languages.

Copied to clipboard
_editables:
  content:
    code_block_options:
      language:
        type: select
        label: Syntax language
        comment: Choose a syntax highlighting language for your code block
        options:
          values:
            - yaml
            - json
            - javascript
{
  "_editables": {
    "content": {
      "code_block_options": {
        "language": {
          "type": "select",
          "label": "Syntax language",
          "comment": "Choose a syntax highlighting language for your code block",
          "options": {
            "values": [
              "yaml",
              "json",
              "javascript"
            ]
          }
        }
      }
    }
  }
}
Open in a new tab