Quick start
The comments module is enabled by default. To disable it entirely, set
modules.comments to false:Configuration
View-only mode, prevents new comments
Allow marking comments as resolved
Container for comments sidebar
Enable dual internal/external comment system
Hide internal comments from view
Show resolved comments in the comments list
Comments-only override for permission checks. See Permission Resolver.
Custom colors for comment highlights.
Opacity values for comment highlights (0–1).
Hover highlight color for comment marks
Colors for tracked change highlights.
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.
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.
Comment content as a string, or an options object with:
addCommentReply
Add a reply to an existing comment or tracked change.
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.
Event type:
pending, add, update, deleted, resolved, selected, change-accepted, or change-rejectedAdditional metadata
Comment data structure
Full example
Comments Example
Runnable example: threaded comments with resolve workflow and event log

