Skip to main content
The Comments extension adds Word-style commenting with threads, replies, and resolution.

Usage

Configure comments through the modules option:

Commands

addComment

Add a comment to the current text selection. Requires text to be selected.
Parameters:
contentOrOptions
string | Object
required
Comment text, or an options object with content, author, authorEmail, authorImage, and isInternal fields

addCommentReply

Add a reply to an existing comment thread.
Parameters:
options
Object
required
Object with parentId (required), content, author, authorEmail, authorImage

removeComment

Remove a comment and its highlight marks from the document.
Parameters:
options
Object
required
Object with commentId and/or importedId

resolveComment

Resolve a comment. Removes the highlight but preserves positional anchors for export.
Parameters:
options
Object
required
Object with commentId

setActiveComment

Set the active/selected comment thread by ID.

setCommentInternal

Toggle whether a comment is internal (private) or external.

setCursorById

Move the cursor to the start of a comment’s range. Also works for tracked change IDs.

Events

Export behavior

Comments export to DOCX as native Word comments:

Source code