Skip to main content
一篇在线文档是由若干个块元素组成的树,不同类型的 BlockElment 内部可嵌套的元素的类型是不同,例如 高亮块 里可以嵌套任意的BlockElement,但是 段落块 下只能其嵌套 InlineElement 。 1 个块元素的数据结构如下:

块元素数据结构说明

一篇在线文档由若干块元素 组成的树状结构构成。不同类型的块元素内部可嵌套的子元素类型不同:
  • calloutcolumnschildren只能是 BlockElement 数组
  • paragraphheadingorderedListunorderedListblockquotechildren只能是 InlineElement 数组
  • table暂不支持指定children

BlockType 枚举

暂未支持的元素类型统一返回Undefined

段落

  • childrenInlineElement 数组
  • paragraph对象不可省略,内容为空时须传{}

标题

  • childrenInlineElement 数组

引用

  • childrenInlineElement 数组

高亮块

  • childrenBlockElement 数组(不能是 InlineElement)。

分栏

  • childrenBlockElement 数组(不能是 InlineElement)。

有序列表

  • childrenInlineElement 数组

无序列表

  • childrenInlineElement 数组

表格

  • children暂不支持指定 children

InlineElement 数据结构说明

行内元素用于文本类块元素(段落、标题、列表等)的children中。

InlineType 枚举

文本

表情

图片

链接

  • childrenText 数组,插入链接时必须指定children,且至少包含 1 个text不为空的文本节点。

通用数据结构

Indent(缩进)


ListObject(列表对象)


ListStyle(列表样式)


SymbolStyle(列表符样式)


Emoji 枚举值(表情编码完整列表)

以下枚举值可用于callout.sticker和行内表情元素sticker.properties.code