跳到主要内容

EnterText

在光标位置向文档添加文本。

语法

expression.EnterText(sText);

expression - 表示 ApiDocument 类的变量。

参数

名称必需/可选数据类型默认值描述
sText必需string要添加到文档的文本。

返回值

boolean

示例

此示例展示如何在当前光标位置输入文本。

// How to add a line break at the cursor position.

// Enter text in a paragraph and add a line break.
let doc = Api.GetDocument();
doc.EnterText("This is the text in your document.");