Available since v0.10.0
Configuration
Usage
Basic Setup:Commands
Find & Search
findFieldAnnotations
Find field annotations matching a predicate function
Added in v0.10.3
findFieldAnnotationsBetween
Find all field annotations between two positions
findFieldAnnotationsByFieldId
Find field annotations by field ID(s)
findFirstFieldAnnotationByFieldId
Find the first field annotation matching a field ID
Added in v0.10.2
findHeaderFooterAnnotationsByFieldId
Find field annotations in headers and footers by field ID or array of field IDs.
Added in v0.11.2
getAllFieldAnnotations
Get all field annotations in the document
getAllFieldAnnotationsWithRect
Get all field annotations with their bounding rectangles
Added in v0.11.0
Delete & Remove
findRemovedFieldAnnotations
Find field annotation nodes that were removed in a transaction
Added in v0.11.2
deleteFieldAnnotations
Delete field annotations by field ID
boolean Command success status
deleteFieldAnnotationsByNode
Delete field annotations by node references
boolean Command success status
deleteFieldAnnotation
Delete a single field annotation
boolean Command success status
sliceFieldAnnotations
Delete a portion of annotations associated with a field
boolean Command success status
Create & Add
addFieldAnnotation
Add field annotation at specified position
boolean Command success status
addFieldAnnotationAtSelection
Add field annotation at current selection position
boolean Command success status
Update & Edit
replaceWithFieldAnnotation
Replace text ranges with field annotations
boolean Command success status
replaceFieldAnnotationsWithLabelInSelection
Replace field annotations with text labels in current selection
Added in v0.11.0
boolean Command success status
replaceFieldAnnotationsWithLabel
Replace field annotations with text labels
Added in v0.11.0
boolean Command success status
resetFieldAnnotations
Reset all field annotations to their default values
boolean Command success status
updateFieldAnnotations
Update field annotations by field ID
boolean Command success status
updateFieldAnnotation
Update a specific field annotation instance
boolean Command success status
updateFieldAnnotationsAttributes
Update the attributes of annotations
boolean Command success status
setFieldAnnotationsHiddenByCondition
Hide field annotations based on a condition
boolean Command success status
unsetFieldAnnotationsHidden
Show all hidden field annotations
boolean Command success status
setFieldAnnotationsVisibility
Set visibility for all field annotations
boolean Command success status
setFieldAnnotationsHighlighted
Set highlighted status for annotations matching predicate
boolean Command success status
toggleFieldAnnotationsFormat
Toggle formatting for field annotations in selection
boolean Command success status
setFieldAnnotationsFontFamily
Set font family for field annotations in current selection
boolean Command success status
setFieldAnnotationsFontSize
Set font size for field annotations in current selection
boolean Command success status
setFieldAnnotationsTextHighlight
Set text highlight color for field annotations in current selection
boolean Command success status
setFieldAnnotationsTextColor
Set text color for field annotations in current selection
boolean Command success status
Helpers
transactionDeletedAnything
Check if a transaction contains any deletion operations
Parameters:
Returns: boolean True if transaction contains deletions
trackFieldAnnotationsDeletion
Track field annotation deletions in a transaction and emit events
Added in v0.11.2
void
handleDropOutside
Handle field annotation drops outside editor boundaries
Parameters:
Events
fieldAnnotationClicked
Field annotation clicked event
Event Data:
node(Node) - The clicked annotation nodenodePos(number) - Position of the node in the document
fieldAnnotationDropped
Field annotation dropped event
Event Data:
sourceField(object) - The dropped field attributes

