跳到主要内容

MoveCursorToAnnotationRange

将光标移动到指定批注范围的开头或结尾,但不选中该范围。

备注

此功能在 ONLYOFFICE Docs 付费版本中可用。

语法​

expression.MoveCursorToAnnotationRange(annotation, isBegin);

expression - 表示 Api 类的变量。

参数​

名称必需/可选数据类型默认值描述
annotation必需TextAnnotation批注对象。
isBegin可选booleantrue如果为 true,则移动到范围的开头;否则移动到结尾。

返回值​

此方法不返回任何数据。

示例​

window.Asc.plugin.executeMethod("MoveCursorToAnnotationRange", [{
paragraphId: "p1",
rangeId: "a1",
name: "grammar"
}, true]);