Class: RichText
富文本。
Constructors
constructor
• new RichText()
Properties
nodes
• nodes: RichTextNode
[] = []
节点列表。
Defined in
Methods
toString
▸ toString(title?
): string
转 Fanbook 富文本。
可用于发送消息。
Parameters
Name | Type | Description |
---|---|---|
title? | string | 富文本标题 |
Returns
string
Fanbook 富文本
Defined in
fromNodes
▸ Static
fromNodes(nodes
): RichText
从富文本节点创建富文本对象。
Parameters
Name | Type | Description |
---|---|---|
nodes | RichTextNode [] | 富文本节点 |
Returns
富文本对象
Defined in
fromText
▸ Static
fromText(text
): RichText
从纯文本创建富文本对象。
Parameters
Name | Type | Description |
---|---|---|
text | string | 纯文本 |
Returns
富文本对象