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
childrenofcalloutandcolumnsmust be a BlockElement array. - The
childrenofparagraph,heading,orderedList,unorderedList, andblockquotemust be an InlineElement array. tabledoes not currently support specifyingchildren.
BlockType enum
Unsupported element types uniformly return Undefined.
Paragraph
children: InlineElement array.- The
paragraphobject 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 thechildren of text-based block elements (paragraphs, headings, lists, and so on).
InlineType enum
Text
Emoji
Image
Link
children: Text array. When inserting a link,childrenmust be specified and contain at least one text node whosetextis not empty.
Common data structures
Indent
ListObject
ListStyle
SymbolStyle
Emoji enum values (complete list of emoji codes)
The following enum values can be used forcallout.sticker and the inline emoji element sticker.properties.code.