跳到主要内容

ReplaceCurrentWord

用指定的字符串替换当前单词。

语法

expression.ReplaceCurrentWord(replaceString, type);

expression - 表示 Api 类的变量。

参数

名称必需/可选数据类型默认值描述
replaceString必需string替换字符串。
type可选TextPartType"entirely"指定是替换整个单词还是仅替换其部分。

返回值

此方法不返回任何数据。

示例

window.Asc.plugin.executeMethod ("ReplaceCurrentWord", ["ONLYOFFICE", "entirely"]);