Node - expand

Purpose

The expand node is a container that enables content to be hidden or shown, similar to an accordion or disclosure widget.

Note: To add an expand to a table (tableCell or tableHeader) use nestedExpand instead.

Type

expand is a top-level block node.

Example

1
2
{
  "type": "expand",
  "attrs": {
    "title": "Hello world"
  },
  "content": [
    {
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "Hello world"
        }
      ]
    }
  ]
}

Fields

NameRequiredTypeValue
typestring"expand".
contentarrayArray of one or more nodes.
attrsobject
attrs.titlestringA title for the expand.
marksarrayAn optional mark.

Content

expand takes an array of one or more of the following nodes:

Rate this page: