ApiRichContent
表示富内容的类。
方法
下表列出了可用的方法。
| 方法 | 返回值 | 描述 |
|---|---|---|
| AddElement | boolean | 使用其在富文本内容中的位置添加富文本段落。 |
| GetClassType | "richContent" | 返回 ApiRichContent 类的类型。 |
| GetContent | ApiRichParagraph[] | 返回当前富文本内容对象中的富文本段落数组。 |
| GetCurrentParagraph | ApiRichParagraph | null | undefined | 返回光标所在的当前段落。 |
| GetCurrentRun | ApiRichRun | null | undefined | 返回光标所在的当前文本域。 |
| GetElement | ApiRichParagraph | null | undefined | 根据其在内容中的位置返回富文本段落。 |
| GetElementsCount | number | 返回当前文档中的元素数量。 |
| GetText | string | 返回当前文档内容对象的内部文本。 |
| Push | boolean | 将富文本段落推送到富文本内容。 |
| RemoveAllElements | boolean | 从当前富文本内容中移除所有元素。 |
| RemoveElement | boolean | 使用指定的位置移除元素。 |