Skip to main content
An online document is a tree composed of multiple block elements. Different types of BlockElement can nest different types of elements inside. For example, a Callout block can nest any BlockElement, but a Paragraph block can only nest InlineElement. The data structure of a single block element is as follows:

Block element data structure

An online document is a tree structure composed of multiple block elements. Different types of block elements support different types of nested child elements:
  • The children of callout and columns must be a BlockElement array.
  • The children of paragraph, heading, orderedList, unorderedList, and blockquote must be an InlineElement array.
  • table does not currently support specifying children.

BlockType enum

Unsupported element types uniformly return Undefined.

Paragraph

  • children: InlineElement array.
  • The paragraph object cannot be omitted. When the content is empty, pass {}.

Heading

  • children: InlineElement array.

Quote

  • children: InlineElement array.

Callout block

  • children: BlockElement array (InlineElement is not allowed).

Columns

  • children: BlockElement array (InlineElement is not allowed).

Numbered list

  • children: InlineElement array.

Bulleted list

  • children: InlineElement array.

Spreadsheet

  • children: Not supported. Specifying children is not currently allowed.

InlineElement data structure

Inline elements are used in the children of text-based block elements (paragraphs, headings, lists, and so on).

InlineType enum

Text

Emoji

Image

  • children: Text array. When inserting a link, children must be specified and contain at least one text node whose text is not empty.

Common data structures

Indent


ListObject


ListStyle


SymbolStyle


Emoji enum values (complete list of emoji codes)

The following enum values can be used for callout.sticker and the inline emoji element sticker.properties.code.