Quick start
The comments module is enabled by default. To disable it entirely, set
modules.comments to false:Configuration
boolean
default:"false"
View-only mode, prevents new comments
boolean
default:"true"
Allow marking comments as resolved
string | HTMLElement
Container for comments sidebar
boolean
default:"false"
Enable dual internal/external comment system
boolean
default:"false"
Hide internal comments from view
boolean
default:"false"
Show resolved comments in the comments list
function
Comments-only override for permission checks. See Permission Resolver.
Object
Custom colors for comment highlights.
Object
Opacity values for comment highlights (0–1).
string
Hover highlight color for comment marks
Object
Colors for tracked change highlights.
Object
Colors for the active tracked change highlight. Same properties as
trackChangeHighlightColors. Defaults to trackChangeHighlightColors values when not set.Viewing mode visibility
Comments are hidden by default whendocumentMode is viewing. Use the
top-level comments.visible and trackChanges.visible flags to control what
renders in read-only mode.
Setting up the comments UI
During initialization:Permission resolver
Customize who can resolve comments or accept tracked changes. The resolver receives the permission type, current user, and any tracked-change metadata. Returnfalse to block the action.
By default, editors can resolve, edit, and delete any user’s comments and tracked changes — regardless of authorship. Use permissionResolver to restrict actions when needed.
You can set a global resolver with the top-level
permissionResolver config.
Module-level resolvers take precedence when both are defined.Word import/export
Word comments are automatically imported with the document and marked withimportedId. When exporting, use the commentsType option:
API methods
These methods are available on the active editor’s commands:addComment
Add a comment to the current text selection. Requires a text selection.
string | Object
Comment content as a string, or an options object with:
addCommentReply
Add a reply to an existing comment or tracked change.
Object
required
removeComment
setActiveComment
Highlight and focus a comment.
resolveComment
setCommentInternal
Toggle a comment between internal and external visibility.
setCursorById
Navigate the cursor to a comment’s position in the document.
Events
onCommentsUpdate
Fired for all comment changes.
string
required
Event type:
pending, add, update, deleted, resolved, selected, change-accepted, or change-rejectedObject
Additional metadata
Comment data structure
Object
Full example
Comments Example
Runnable example: threaded comments with resolve workflow and event log

