Rate this page:

Node - table

Purpose

The table node provides a container for the nodes that define a table.

Note: only supported on web and desktop. Mobile rendering support for tables is not available.

Type

table is a top-level block node.

Example

1
2
{
  "type": "table",
  "attrs": {
    "isNumberColumnEnabled": false,
    "layout": "default"
  },
  "content": [
    {
      "type": "tableRow",
      "content": [
        {
          "type": "tableCell",
          "attrs": {},
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": " Row one, cell one"
                }
              ]
            }
          ]
        },
        {
          "type": "tableCell",
          "attrs": {},
          "content": [
            {
              "type": "paragraph",
              "content": [
                {
                  "type": "text",
                  "text": "Row one, cell two"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Fields

NameRequiredTypeValue
typestring"table"
contentarrayArray of one or more nodes
attrsobject
attrs.isNumberColumnEnabledboolean'true','false'
attrs.layoutstring'default', 'full-width', 'wide'

Content

content takes an array of one or more tableRow nodes.

Attributes

When isNumberColumnEnabled set to 'true' the first table column provides numbering for the table rows.

layout determines the layout of the table as follows:

  • 'default' displays the table within the text container margins.
  • 'full-width' stretches the table to the full width of the page.
  • 'wide' allows the table to bleed into the text container margins.

These settings do not apply in Jira where tables are automatically displayed across the full width of the text container.

Rate this page: