Skip to main content

AnnotateParagraph

Adds annotations to the specified paragraph.

Syntax

expression.AnnotateParagraph(data);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
dataRequiredObjectAnnotation data specifying what to annotate.
data.typeRequiredstringThe type of annotation operation (e.g., "highlightText").
data.nameOptionalstringOptional name of the annotation.
data.paragraphIdRequiredstringID of the paragraph being annotated.
data.recalcIdRequiredstringParagraph recalculation ID.
data.rangesOptionalTextAnnotationRange[]Array of text ranges to highlight (for highlightText type)

Returns

This method doesn't return any data.

Example

window.Asc.plugin.executeMethod("AnnotateParagraph", [{
type: "highlightText",
name: "grammar",
paragraphId: "p1",
recalcId: "r12",
ranges: [
{ start: 5, length: 10, id: "a1" }
]
}]);