Skip to main content

Threads

addCommentAnnotation

addCommentOnSelectedText

By default, when you highlight over any text in textMode a Comment Tool button will appear. Clicking the button will add a comment on the highlighted text. If you want to trigger the comment using an API method call instead of clicking the button, you can do the following:

addCommentOnElement

Adds a Comment on a specific element by ID. To add a comment on a specific element through an API method, use the addCommentOnElement() method and pass in an object with the schema shows in the example: Example 1: Add comment with targetElementId only:

addManualComment

  • This feature is particularly useful for complex UIs where you need precise control over the placement of Comment Pins.
  • Using this you can manually set the position of Comment Annotations.
  • Handle click events on your canvas/document and use the this method to create a comment with custom metadata.

Comment and Reply Placeholders

Customize the placeholder text shown in the Comments dialog inputs to match your product voice and guide first-time users.
To customize placeholder text shown when editing an existing comment or reply, use editPlaceholder, editCommentPlaceholder, and editReplyPlaceholder. See VeltCommentsProps for details.

deleteCommentAnnotation

deleteSelectedComment

To delete a comment using an API method, use the deleteSelectedComment() method.

getCommentAnnotationsCount

  • Get the total and unread comment annotations count of all the comment annotations across specified Organization, Folder, Document and Multiple Documents levels.
  • If you don’t specify any query, it will return data from the folder/documents specified in the setDocuments method.
  • You can also use this api without setting the document.
  • Auto-batching: When 2+ documentIds are provided, requests are automatically batched to reduce persistence listeners. Use debounceMs to control batching delay (default: 5000ms).
  • Params: (optional) CommentRequestQuery
    • Set aggregateDocuments to true to aggregate comment counts across all documents set in the setDocuments method, returning a single combined count instead of per-document counts.
    • Set batchedPerDocument to true if you want to display comment count for a large number of documents (e.g., 100 documents) on the same page. This is now automatically enabled when 2+ documentIds are provided.
    • Refer to CommentRequestQuery for more parameters you can use.
  • Returns: GetCommentAnnotationsCountResponse
Using API:

getUnreadCommentAnnotationCountByLocationId

  • Get the number of CommentAnnotations with at least 1 unread Comment by Location Id.
Using Hooks:
Using API:
To unsubscribe from the subscription:

getCommentAnnotations

  • Subscribe to the comment annotations for all the specified documents.
  • If you don’t specify any query, it will return data from the currently set documents and locations.
  • You can specify 30 documents at a time.
  • Params: (optional) CommentRequestQuery
  • Returns: GetCommentAnnotationsResponse
Available on SDK version 4.0.0 and above.
Using Hooks:
Using API:

fetchCommentAnnotations

  • Fetches comment annotations based on various criteria such as organizationId, folderId, or specific documentIds.
  • It supports pagination and filtering options.
  • This is different from the existing subscription API which susbcribes to realtime changes to the comments data.
  • Params: FetchCommentAnnotationsRequest
  • Returns: FetchCommentAnnotationsResponse

getSelectedComments

Unsubscribe from the subscription when you’re done:

getCommentAnnotationById

  • Retrieve a specific comment annotation by its ID.
  • By default, it will return the comment annotation for the current documentId.
  • If you pass in a documentId, it will return the comment annotation for the given documentId.
  • Returns: CommentAnnotation
Using Hooks:
Using API:
To unsubscribe from the subscription:

getElementRefByAnnotationId

This will return the Xpath of the DOM element on which the comment was added.

submitComment

Programmatically submit a comment from a composer. Enables custom buttons or keyboard shortcuts for submitting comments. The composer must have a targetComposerElementId set for this method to work.

clearComposer

Reset composer state including text, attachments, recordings, tagged users, assignments, and custom lists.

getComposerData

Fetch current composer state on-demand. Returns same data structure as composerTextChange event.

markAsRead

  • Mark a comment annotation as read for the current user. This updates the viewedBy field of the comment annotation to include the current user.
  • Params: annotationId: string
  • Returns: Promise<void>

markAsUnread

  • Mark a comment annotation as unread for the current user. This removes the current user from the viewedBy field of the comment annotation.
  • Params: annotationId: string
  • Returns: Promise<void>

Messages

addComment

updateComment

deleteComment

getComment

getUnreadCommentCountOnCurrentDocument

You can get the number of unread Comments on the current Document by using the useUnreadCommentCountOnCurrentDocument() hook:

getUnreadCommentCountByLocationId

You can get the number of unread Comments by Location Id by using the useUnreadCommentCountByLocationId() hook:

getUnreadCommentCountByAnnotationId

You can get the number of unread Comments by annotation id by using the useUnreadCommentCountByAnnotationId() hook:

@Mentions

assignUser

setAssignToType

Configure the assign-to UI mode as dropdown or checkbox. API Method: setAssignToType()

customAutocompleteSearch

  • Handle autocomplete search for @mentions. You should use this if you have a large contact list that you want to plug into the autocomplete dropdown, and search directly your own data source.
  • Event: AutocompleteSearchEvent
1

Enable the feature

2

Set initial list

3

Handle search event

enableAtHere

  • This allows you to notify all the users explicitly added to the current document.
  • It won’t notify users in the organization who are not explicitly added to the document.
Default: Disabled.
Hooks:
API:

enableUserMentions

  • This allows you to enable or disable user @mentions.
Whether user @mentions are enabled. Default: true
Using Props:
Using Hooks:
Using API Method:

enablePaginatedContactList

  • Limits users downloaded for customers with thousands of users.
  • Performance optimization that reduces initial download.
Default: false
Using Props:
Using API Method:

anonymousEmail

  • Controls whether unrecognized email addresses (not in the contact list) are resolved in the @mention flow.
  • When disabled:
    • Freeform email addresses entered in the composer are ignored: they won’t show up in @mention suggestions, won’t be added to taggedUserContacts, and won’t be converted to contacts. However, known contacts (users matched from your contact list by email) will always appear, no matter this setting.
    • Notifications will not be sent to anonymous (unrecognized) email addresses.
Default: true
Using Props:
Using API Method:

expandMentionGroups

  • Expand the user groups and show individual users inside the groups in the @mentions dropdown menu.

Mention Span CSS Classes

  • When a user selects an @mention from the autocomplete dropdown, the inserted <span> element receives CSS classes that indicate the mention type.
  • velt-mention is always present on every mention span.
  • velt-mention--name is added when the mention is a user name.
  • velt-mention--email is added when the mention is an email address.
Use these classes to apply distinct visual treatments to name vs. email mentions in the composer:

getContactList

  • Subscribe to the list of users added to organization, folder, document, user groups or the ones overwritten using the updateContactList API.
  • Params: none
  • Returns: GetContactListResponse
Using Hooks:
Using API:

onContactSelected

  • This event is triggered when a contact is selected from the contact dropdown in the Comment Dialog.
  • Use the event object to determine if the selected contact has access to the document using fields like isOrganizationContact, isDocumentContact and documentAccessType.
  • If the selected contact doesn’t have access to the document, you can show an invite dialog to the user to invite the contact to the document.
The returned data will be in the following schema:
Using Hooks:
Using API:

setAtHereLabel

  • This allows you to modify the default text of the @here feature. eg: @all, @everyone, @team, etc.
Using Props:
Using Hooks:
Using API Method:

setAtHereDescription

  • Customize the description that appears for the @here mention.
Using Props:
Using Hooks:
Using API Method:

showMentionGroupsFirst

  • Show the user groups in the @mentions dropdown menu before the non-group users.

showMentionGroupsOnly

  • Show only the user groups in the @mentions dropdown menu and not the non-group users.

subscribeCommentAnnotation

unsubscribeCommentAnnotation

updateContactList

  • By default, the contact list is generated using the users in the organization and the document.
  • However, if you do not want to use that feature or want to provide a custom list of contacts, you can use this method.
  • By default, it will overwrite the current contact list. You can merge the provided contacts with the existing list by passing the merge flag as {merge:true}.
  • When filters: true is passed, the sidebar People, Assigned, Tagged, and Involved filters are restricted to the custom contact list plus the current user.
  • This method will only update the contact list in the current user session. It doesn’t update the user contacts in the database or change the access control.
Using Hooks:
Using API:
Restrict sidebar filters to the contact list:

updateContactListScopeForOrganizationUsers

  • Sometimes you may want to show only certain types of contacts in the contact dropdown.
  • By default, organization users will see all contacts in the organization, any user groups and any contacts added to the document.
  • Using this method, you can restrict the contacts shown in the dropdown to only certain types.
  • This only affects the Organization Users and not the Document Users. Document Users will always only see contacts added to the document.
Here are the available options:
  • all: Show all the contacts
  • organization: Show organization contacts.
  • organizationUserGroup: Show organization user groups.
  • document: Show document contacts.

setAnonymousUserDataProvider

Register a provider to resolve email → userId mappings for users who are tagged by email in comments but are not part of the contact list. When a comment is saved and a tagged contact or to recipient has an email but no userId, the SDK calls the provider to look up the userId and backfills it into the comment data before persisting. Full implementation guide →

autoCompleteScrollConfig

Customize virtual scroll behavior in autocomplete dropdown for @mentions. Type: AutoCompleteScrollConfig

Metadata

addContext

Custom metadata allows you to add extra information to comments, enhancing their functionality. Here’s what you can do with it:
  • Render additional data on comments
  • Position comment pins manually
  • Create custom UI components
  • Enable comment filtering on custom data
To add custom metadata, use one of the following events which has the addContext method. This method accepts an object with key-value pairs.
  • addCommentAnnotationDraft
  • addCommentAnnotation
Alternatively, you can pass context as a prop to most components that helps with creating new comment annotations. Eg:
  • VeltCommentTool
  • VeltCommentComposer
  • VeltCommentDialogComposer
  • VeltInlineCommentsSection

updateContext

  • Update the custom metadata associated with a comment annotation using the updateContext method.
  • Utilize this method to update the context of a comment annotation at any time. For example, you might use this when the name of the dashboard containing the comment annotation changes.
The commentElement.updateContext() method accepts three parameters:
  • The Comment Annotation ID
  • The new metadata object
  • An optional updateContextConfig object. Specify how the new metadata should be applied:
    • { merge: true }: Merges the new metadata with the existing metadata
    • { merge: false } or omitted: Replaces the existing metadata entirely (default behavior)
Using API:

setContextProvider

Provide custom context (metadata) dynamically for comments using a provider function. This method allows you to return context based on the document and location where a comment is being added. The SDK will call this function whenever a new comment annotation is created so you can provide dynamic values for the context. The provider function receives documentId and optional location parameters and can return a CommentContext object, null, undefined, or a Promise resolving to any of these values.

setContextInPageModeComposer

Set context data for the page mode composer programmatically. Accepts a PageModeComposerConfig object. Pass custom context data that will be included when a comment is created through the page mode composer. API Method: setContextInPageModeComposer()
For automatic context passing when opening the comment sidebar via the comment tool, see contextInPageModeComposer.

clearPageModeComposerContext

Clear context data from page mode composer. This is useful when you are using sidebar in embed mode and have to clear the context from page mode composer manually. API Method: clearPageModeComposerContext()
  • Params: none
  • Returns: void

Aggregation

Overview

Aggregation lets you filter, group, and render comments that match specific criteria — without writing any custom logic.
It’s especially powerful when comments are tied to structured data such as products, categories, or financial entities.
You can group comments by:
  • Metadata (context)
  • Element IDs (targetElementId)
  • Resource identifiers (documentId, folderId, locationId)
In short: aggregation helps you query comments like data.

When to Use Aggregation

Use aggregation when your app involves complex relationships or taxonomy-based filtering.

🧩 Tables & Dashboards

Supply Chain Example
A product can belong to multiple categories. When viewing data by category, you may want to display all comments made on products within that category — or even across product variants.
Financial Planning Example
A budget item (e.g., Marketing Q1) can have multiple subcategories (e.g., Paid Ads, Sponsorships).
Aggregation allows you to show all comments related to a specific period, department, or account group — even if those comments live across different documents or views.

How It Works

Comment Metadata Fields

Each comment can include one or more of the following identifiers or metadata fields:
FieldDescription
folderIdTarget folder ID
documentIdTarget document ID
locationIdTarget location ID
targetElementIdTarget DOM element ID
contextCustom metadata object for grouping or filtering

Comment Creation

When you use any of the above identifiers or metadata fields in the following supported components, they automatically get attached to the comment at the time it’s created.
This ensures that each comment carries the correct folder, document, element, or context metadata — so it can later be filtered or grouped accurately.
Supported Components
  • Inline Comments Section
  • Comment Tool

Comment Rendering

When the above identifiers or metadata fields are passed to the following rendering components, they determine which comments are displayed. Only comments that match the provided folder, document, element, or context values will be rendered in that component. Supported Components
  • Comment Bubble
  • Inline Comments Section
  • Comment Pin (Standalone) — does not support targetElementId

Filtering Behavior

When filtering comments, only annotations matching all provided fields will be shown:

Context Matching

You can choose between two matching modes for the context field: Full Match (default) or Partial Match.

🔒 Full Match (Default)

A comment matches only if all fields in its context exactly match your filter criteria. Example:

🔍 Partial Match

Enable partial matching with contextOptions={{ partialMatch: true }}. A comment matches if all fields in your filter exist in the comment’s context.
Extra fields in the comment context don’t prevent a match.
Example:
Example

Grouping Matched Comment Annotations

When multiple comments match your filter criteria, you can group them into a single visual element — such as a Comment Bubble, Comment Pin, or Inline Comments Section — for a cleaner, multi-threaded UI. How it works:
  • Enable grouping globally with groupMatchedComments
  • All matching annotations are shown as one grouped thread
  • The comment count shows total grouped annotations
  • Users can expand to view and interact with all related threads
Example If there are three comments for "product: cheese" across different months, they can all appear in one Comment Bubble when you filter by { product: "cheese" }.

Private Comments (beta)

The visibility system uses two separate sets of values:
  • API methods (on this page) use CommentVisibilityConfig with 3 values: 'public', 'organizationPrivate', 'restricted'.
  • UI wireframes use the CommentVisibilityOption enum with 4 values: 'restrictedSelf', 'restrictedSelectedPeople', 'organizationPrivate', 'public'.
The API’s single 'restricted' value covers both “self-only” and “selected people” — distinguished by whether userIds is provided.
To use this feature, you need to first enable it in Velt Console.

updateVisibility

Manage who can view a comment annotation by updating its visibility settings. Use this method to control whether a comment is public, restricted to your organization, or visible only to specific users. The resulting setting is stored on the annotation as visibilityConfig.
  • To use this feature, you need to first enable it in Velt Console
  • Params: CommentVisibilityConfig
    • type:
      • 'public': Comment visible to all users
      • 'organizationPrivate': Comment visible only to users in the specified organization. Even if someone is added to the document but not to the organization, they will not be able to view the comment.
      • 'restricted': Comment visible only to the specified users; the current user is always included
    • organizationId: string; required if type is organizationPrivate
    • userIds: string[]; optional when type is 'restricted' — current user is always appended
  • Returns: void
When type is 'restricted', the SDK automatically appends the current user’s userId to userIds if it is not already present. This applies whether userIds is empty or contains an explicit list that excludes the author.

enablePrivateMode

Set the default visibility for all new comments created by the current user.
  • Params: PrivateModeConfig
    • type:
      • 'restricted': New comments visible only to the specified users; the current user is always included
      • 'organizationPrivate': New comments visible only to users in the current organization
    • userIds: string[]; optional when type is 'restricted' — current user is always appended
  • Returns: void
When type is 'restricted', the SDK automatically appends the current user’s userId to userIds if it is not already present. This applies whether userIds is empty or contains an explicit list that excludes the author.

disablePrivateMode

Revert new comment visibility to default public visibility.
  • Returns: void

visibilityOptions

Show a visibility banner on the comment composer that lets users set a comment’s visibility to public, organization-private, restricted-self, or restricted before submitting. Users can also change visibility after submission from the thread options menu. Default: false
Using Props:
Using API:

visibilityOptionClicked

Subscribe to this event to be notified when a user selects a visibility option. Emits a VisibilityOptionClickedEvent.

Setting visibility at comment creation time

If you are creating comments using API, then pass a CommentVisibilityConfig as the optional visibility field on AddCommentRequest to pre-set visibility when programmatically adding a comment.
Using Hooks:
Using API:

Custom Lists

createCustomListDataOnAnnotation

  • Add a custom dropdown list at the Comment Annotation level.
  • Use this to add custom tags or categories to the comment.
Using Props:
API Method:

createCustomListDataOnComment

You can have custom dropdown lists appear when certain hotkeys are pressed. When you press a hotkey inside the Comment Dialog composer, it will open a dropdown list of items that you can select. Selecting an item frop the dropdown list will add a chip that inside the comment text.
Grouped lists: Useful for workflows like issue trackers (e.g., group by “Priority” or “Status”), allowing users to quickly refer and insert custom entities from your app. With this feature, you can combine multiple entity types into one drop down just like Linear.
Make sure the hotkey is a single character such as # or /.
The items in the list must be in the following schema:
Use AutocompleteGroup only for grouped lists. For flat lists, do not include groups on the config object or groupId on items.
Flat List Implementation
Grouped List Implementation
Listen to click events on chips
After the comment is saved, the item will be rendered as a chip on the comment content. When the user clicks on it, you will get an event callback with the data of the clicked chip (AutocompleteItem).
This event will also be triggered when the user clicks on the contact chips added via the @mentions feature.

customAutocompleteSearch

  • Handle autocomplete search for custom list. You should use this if you have a large list that you want to plug into the autocomplete dropdown, and search directly your own data source.
  • Event: AutocompleteSearchEvent
1

Enable the feature

2

Set initial list

3

Handle search event

Event Subscription

on

Subscribe to Comment Events. Here is the list of events you can subscribe to and the event objects you will receive.
CategoryEvent TypeDescriptionEvent Object
ThreadsaddCommentAnnotationDraftTriggered before addCommentAnnotation event clicks on the comment tool and the composer is rendered.AddCommentAnnotationDraftEvent
ThreadsaddCommentAnnotationAdd a new comment annotationAddCommentAnnotationEvent
ThreadsaddCommentDraftTriggered when a user abandons a reply or edit composer without savingAddCommentDraftEvent
ThreadsdeleteCommentAnnotationDelete a comment annotationDeleteCommentAnnotationEvent
MessagesaddCommentAdd a new commentAddCommentEvent
MessagesupdateCommentUpdate an existing commentUpdateCommentEvent
MessagesdeleteCommentDelete a commentDeleteCommentEvent
@MentionsassignUserAssign a user to a commentAssignUserEvent
@MentionssubscribeCommentAnnotationSubscribe to a comment annotationSubscribeCommentAnnotationEvent
@MentionsunsubscribeCommentAnnotationUnsubscribe from a comment annotationUnsubscribeCommentAnnotationEvent
@MentionsautocompleteSearchWhen user starts searching for a contact in the @mentions dropdown or for a list item in the custom list dropdownAutocompleteSearchEvent
AttachmentsaddAttachmentAdd an attachment to a commentAddAttachmentEvent
AttachmentsdeleteAttachmentDelete an attachment from a commentDeleteAttachmentEvent
AttachmentsattachmentDownloadClickedTriggered when attachment download button is clickedAttachmentDownloadClickedEvent
ReactionsaddReactionAdd a reaction to a commentAddReactionEvent
ReactionsdeleteReactionDelete a reaction from a commentDeleteReactionEvent
ReactionstoggleReactionToggle a reaction on a commentToggleReactionEvent
Status & PriorityupdateStatusUpdate the status of a commentUpdateStatusEvent
Status & PriorityresolveCommentResolve a commentResolveCommentEvent
Status & PriorityupdatePriorityUpdate the priority of a commentUpdatePriorityEvent
Status & PriorityapproveCommentAnnotationApprove a comment annotationApproveCommentAnnotationEvent
Status & PriorityacceptCommentAnnotationAccept a comment annotationAcceptCommentAnnotationEvent
Status & PriorityrejectCommentAnnotationReject a comment annotationRejectCommentAnnotationEvent
Agent SuggestionssuggestionAcceptedTriggered when a reviewer accepts an agent suggestion (finding) from the comment dialogSuggestionAcceptEvent
Agent SuggestionssuggestionRejectedTriggered when a reviewer rejects an agent suggestion (finding) from the comment dialogSuggestionRejectEvent
RecordingsdeleteRecordingDelete a recording from a commentDeleteRecordingEvent
Deep LinkscopyLinkCopy a deep link to a commentCopyLinkEvent
Comment SidebarcommentSidebarDataInitTriggered when comment sidebar data is first loadedCommentSidebarDataInitEvent
Comment SidebarcommentSidebarDataUpdateTriggered when comment sidebar data is updatedCommentSidebarDataUpdateEvent
Comment SidebarsidebarOpenTriggered when the comment sidebar opensSidebarOpenEvent
Comment SidebarsidebarCloseTriggered when the comment sidebar closesSidebarCloseEvent
Comment SidebarcommentClickTriggered when a comment is clicked in the sidebar listCommentClickEvent
Comment SidebarcommentNavigationButtonClickTriggered when the navigation (“go to”) button on a sidebar comment is clickedCommentNavigationButtonClickEvent
UIcomposerClickedTriggered when comment composer is clickedComposerClickedEvent
UIcomposerTextChangeTriggered when text changes in any comment composer. Includes full draft annotation object and composer ID.ComposerTextChangeEvent
UIcommentPinClickedTriggered when a comment pin is clickedCommentPinClickedEvent
UIcommentBubbleClickedTriggered when a comment bubble is clickedCommentBubbleClickedEvent
UIlinkClickedTriggered when a clickable link in comment content is clickedLinkClickedEvent
UIcommentToolClickedPast-tense alias for commentToolClick, identical payloadCommentToolClickedEvent
UIsidebarButtonClickedPast-tense alias for sidebarButtonClick, identical payloadSidebarButtonClickedEvent
RecordertranscriptionDoneTriggered when a transcription is generated and readyTranscriptionDoneEvent
ThreadscommentSavedTriggered when a comment annotation is saved to the databaseCommentSavedEvent
ThreadscommentSaveTriggeredTriggered immediately when the save button is clicked, before async save completesCommentSaveTriggeredEvent
VisibilityvisibilityOptionClickedTriggered when a user selects a visibility optionVisibilityOptionClickedEvent

Attachments

enableAttachments

Whether file attachments are enabled. Default: true When this is on, users can attach image files to their comments. Users can download or delete an attachment. Users can attach multiple files at once. Currently we support .png, .jpg, .gif (static & animated), .svg file types up to 15MB per file.

enableAttachmentDownload

Controls whether clicking an attachment triggers a file download. Default: true When disabled, users can still click attachments but no download is triggered. The attachmentDownloadClicked event fires on every attachment click regardless of this setting.

enableScreenshot

Whether screenshot option is enabled in comments. Default: false When enabled, users can attach screenshots when adding comments. This provides a quick way to capture and share visual context.

addAttachment

deleteAttachment

getAttachment

allowedFileTypes

Limit file types in comment attachments by specifying allowed file extensions. Default: Not specified (all supported file types allowed) When this property is set, users can only attach files with the specified extensions. This helps you maintain security standards and ensure only approved file types are shared in collaborative discussions. By default, Velt supports .png, .jpg, .gif (static & animated), .svg file types up to 15MB per file. With allowedFileTypes, you can restrict to a subset of these or any other file extensions your application requires.

attachmentNameInMessage

Display the attachment filename in the message when a file is attached. Default: false When this property is enabled, the attachment filename will appear in the message text when a user selects a file to attach. This provides immediate visual confirmation of which file they’ve attached to their comment, improving clarity before submitting.

setComposerFileAttachments

Programmatically add file attachments to the comment composer from your application instead of requiring users to select files from the file system. This method enables workflows where you want to attach files programmatically, such as:
  • Attaching screenshots captured within your application
  • Including generated reports or documents
  • Adding files from your own storage system
  • Pre-populating attachments based on user context
Params: UploadFileData The UploadFileData object accepts the following properties:
  • files (required): Array of File objects to attach to the comment composer
  • annotationId (optional): ID of the target comment annotation. Use this to add attachments to an existing comment thread
  • targetElementId (optional): ID of the target element where the comment composer is attached. Use this to add attachments to a specific element

attachmentDownload

Control whether attachment downloads happen automatically when users click the download button. Default: true When enabled, clicking the download button on an attachment will automatically download the file. When disabled, the automatic download is prevented, and you can handle the download action with custom logic by subscribing to the attachmentDownloadClicked event. This is useful for:
  • Tracking download analytics before initiating the download
  • Implementing custom download URLs or CDN routes
  • Adding access control checks before allowing downloads

Text Formatting

enableFormatOptions

Enable rich text formatting toolbar in comment composers. Users can apply bold, italic, underline, and strikethrough formatting. Default: false

setFormatConfig

Configure which format types are available in the formatting toolbar. Params: FormatConfig

Reactions

enableReactions

Whether emoji reactions are enabled. Default: true

setCustomReactions

  • You can set custom reactions by passing a map that contains information about the reactions you want to add.
  • The map keys should be the reaction ID, and the map value should contain an object with either an url or emoji field to represent the reaction icon you want to use.

addReaction

deleteReaction

toggleReaction

Status & Priority

enableStatus

Whether to enable the default status dropdown & filters. Default: true When this is on, users can assign a status to each comment & filter comment by status in the sidebar. You can customize the list of status options as shown below on this page.
API Method:

setCustomStatus

  • With custom statuses, you can replace the default statuses with your own values.
  • These statuses are also used in the comment sidebar to filter comments by status.
  • There are three types of statuses:
    • default: This will be the default status assigned to each comment.
    • ongoing: This is treated as an intermediary status, you can add as many statuses with type ongoing as you want.
    • terminal: This represents a status that is completed. Comments with this status type are no longer shown in the DOM.
  • Ensure that there are at least 2 statuses set.

enableResolveButton

Whether to show resolve button on comments. Default: true This adds a tick mark button on the top right corner of the comment dialog. Clicking on this button will mark the comment as resolved.
API Method:

updateStatus

resolveCommentAnnotation

enablePriority

Whether to enable setting priority on comments. Default: false When this is on, users can assign a priority to each comment & filter comment by priority in the sidebar. You can customize the list of priority options as shown later on this page in the Set Custom Priorities section.
API Method:

setCustomPriority

Pass custom priorities in the customPriority prop.Default priorities: P0, P1, P2With custom priorities, you can replace the default priorities with your own values. These priorities are also used in the comment sidebar to filter comments by priority.This will work if you have enabled the priority feature.The color property is used to set the priority pill background color.The lightColor property sets the background color of the filter.
API Method:
Make sure to have at least 2 categories set.

updatePriority

Recording

deleteRecording

getRecording

setAllowedRecordings

Set the Recorder media options within Comments: (audio, screen, video, all).
  • audio: enables audio recording
  • screen: enables screen recording
  • video: enables video recording
  • all: enables all recording options
  • none: disables all recording options
Default: "audio"
Using API:

enableRecordingCountdown

Whether the Recorder countdown is enabled. Default: true

enableRecordingTranscription

Controls whether to enable AI transcription for recordings. Default: enabled
Using Props:
Using API Methods:

Deep Link

Navigation

scrollToCommentByAnnotationId

  • This will scroll the page to the element directly. This will work if the element is present on the DOM.

selectCommentByAnnotationId

  • Use this to programmatically select a comment annotation by its ID.
  • When called without arguments or with an invalid ID, it will close the currently selected annotation.
  • Example: If the user opens a comment URL from an email notification, you can use this to open the comment dialog after your page has finished rendering.

onCommentSelectionChange

The useCommentSelectionChangeHandler hook can be used to subscribe to Comment selection changes.

enablescrollToComment

Whether, users will be scrolled to the location of a Comment when it is clicked. Default: true By default, users will be redirected to a Comment if the comment id is provided in the url. But sometimes this experience is annoying, so we have provided a way to disable the option to automatically scroll users to the location of the Comment.
To disable the feature, set scrollToComment to false.
API methods:

DOM Controls

allowedElementIds

allowedElementClassNames

allowedElementQuerySelectors

Provide a list of element DOM IDs, class names, or query selectors where commenting should be allowed. Comments will be disabled for all other elements. Note, this does not impact Popover mode.
Using Props:
Using API Method:

data-velt-comment-disabled

Disable certain elements from being commented on. Add the data-velt-comment-disabled attribute to elements where you want to disable commenting.

sourceId

  • When you have multiple elements with the same DOM ID, you can use the sourceId attribute to control which element displays the comment dialog when adding a new comment.
  • By default, comments appear on all matching elements.
  • This is useful in cases where you have multiple instances of the same data component on a page and want the comment to appear on each instance, such as Popover comments on a table.
  • You can randomly generate the sourceId. It just needs to be unique for each element in the current session.

AI Categorization

enableAutoCategorize

Whether AI auto-categorization of comments is enabled. Default: false We use AI to analyze your comment content and auto-categorize it so users can filter comments easily. You can provide a list of custom categories that we should use to categorize the comments (shown below).
API Method:

setCustomCategory

Pass custom categories in the customCategory prop.Default categories: Question, Feedback, Bug, Other.With custom categories, you can replace the default categories with your own values.These categories are used in the Comments Sidebar to filter comments by category. The AI autoCategorize feature uses the list of categories to determine the closest category to choose from.The input format to the customCategory prop should be an array of objects with an id, name, and color.The color property is used to set the category pill background color.
API Method:
Make sure to have at least 2 categories set.

Agent Comments

Agent comments let your AI agents leave comments and findings directly in Velt by calling the Comment Annotations REST APIs — no SDK changes required. They are built on top of the same Comments feature, but render with a special UI: each agent finding is a suggestion with Accept and Reject buttons on the comment dialog. For the full guide — the agent block, request/response shapes, and velt vs external agents — see Agent Comments.

Create an agent comment

Your agent calls the Add Comment Annotations API with an agent block attached to the root comment and type: "suggestion". The server stamps sourceType: "agent" on both the comment and the annotation.
cURL
To read agent comments back, use the Get Comment Annotations API with agent-specific filters (agentId, executionId, agentSource, agentSuggestions, agentComments).

Handle accept / reject

Because agent findings render with Accept and Reject buttons on the comment dialog, the outcome is emitted on the comment element as the suggestionAccepted and suggestionRejected events. Subscribe to them to apply the change to your own data or trigger follow-up logic.

UI/UX

composerMode

By default, the Composer in the Comments Dialog only shows the text input box and does not show the actions bar until the Composer is clicked on or the user starts typing. You can modify this behavior by setting the Composer Mode prop to "expanded". This will make the actions bar always visible. To keep the default behavior you can set the property to "default". Default: "default"

commentToNearestAllowedElement

Attach comment pins to the closest allowed element when clicking on a non-allowed element. Default: false
Using API:

deleteThreadWithFirstComment

Whether deleting the first comment in a thread will delete the entire thread. Default: true

draftMode

Whether to store comments in draft if they are not submitted. When enabled, partial comments are preserved when the dialog closes, including composer text, attachments, and recordings. Default: true Behavior:
  • Partial comments are saved with isDraft: true when the dialog is closed
  • The dialog shows a shake animation on the first click outside if there’s unsaved content
  • The data-velt-annotation-draft attribute is set on dialogs with unsaved content for custom styling
Using API:

enableCollapsedComments

You can control whether comments inside the annotation should be collapsed. Default: false
Using Props:
Using API:

enableFullExpanded

  • You can control whether comments should be shown in fully expanded state by default.
  • Available on all comment-related components and can be controlled via props or API methods.
Default: false
Using Props:
Using API:

enableShortUserName

You can control whether long user names should be shortened. For long names, this will first create an initial of the second name and if the name is still long, it will truncate it with ellipses. Default: true
Using Props:
Using API:

enableSignInButton

Whether to enable Sign In button on comment dialog when user is anonymous or signed out. Default: false This allows anonymous or signed out users to still read the comments but encourages them to sign in if they want to respond to the comments.
API Method:

enableSidebarButtonOnCommentDialog

Whether the Sidebar Button on Comment Dialogs show up. Default: true By Default, each Comment Dialog has a button at the bottom that will open the Comments Sidebar when clicked. To disable it, you can set it to false:
Using Props:
Using API methods:

enableDeleteReplyConfirmation

You can enable a confirmation dialog before deleting a reply in comment threads. This feature helps prevent accidental deletions and improves user experience.
Using Props:
Using API:

enableMobileMode

Whether mobile mode is enabled. When mobile mode is enabled and the screen width is small enough, comment windows will appear fixed to the bottom of the screen and full width instead of the usual popup window. Default: false
API Method:

enableCommentPinHighlighter

Wheter the pin highlighter outline is enabled or not. Default: true
API Methods:

pinDrag

Whether comment pins can be dragged to reposition them. Default: true
API Methods:

enableDialogOnHover

Whether the comment dialog shows on hover over the comment pin or the target element. Default: true
API Method:

enableFloatingCommentDialog

Whether floating comment dialog is shown next to comment pin on hover or click. Default: true
API Method:

excludeLocationIds

Use this to filter out Comments at a specific Location for certain Users.
To reset it, you can pass an empty array:

enableReplyAvatars

This shows the avatars of unique users who have replied to a comment.
  • replyAvatars: Whether the reply avatar component is enabled.
  • maxReplyAvatars: The maximum number of reply avatars to show. It will show the count of remaining unque users as the next avatar.
Default: false
Using props:
Using API:

filterCommentsOnDom

  • Filter out comments in the DOM when they are filtered in the sidebar.
  • When the sidebar is closed (default mode) or unmounted (embed mode), the DOM filter will be removed.
  • Dual-gate behavior: When setCommentSidebarData() is also active, this feature applies an AND — on-page pins must satisfy both the active sidebar filter criteria and the custom id list from setCommentSidebarData(). Drafts (isDraft: true) bypass both gates so an in-progress unposted comment is never filtered out from under the user.
Default: false
Using Props:
Using API:

focusPageModeComposer

Focus the page mode composer input field programmatically. Use this to direct user attention to the page mode composer. API Method: [focusPageModeComposer()](/api-reference/sdk/api/api-methods#focuspagemode composer)

onSidebarButtonOnCommentDialogClick

Use this to act on clicks on the Sidebar Button at the bottom of the Comment Dialog.
Using Props:
Using Hooks:
Using API methods:
To unsubscribe from the subscription:

onSignIn

When the user clicks on the sign in button, we will emit an onSignIn event that you can handle with your own sign in method. No data is passed with the event.

showCommentsOnDom

Whether comments are shown on the DOM. Default: true By default, all the comments will be visible on DOM whenever we are able to detect to elements for that. But users can hide it from DOM if required. There are 2 ways to show/hide comments on DOM: Configuring attributes on the React Component:
Using API methods:

showResolvedCommentsOnDom

Whether to show resolved comments on the DOM. Default: false
API Methods:

updateCommentDialogPosition

  • Sometimes when you manually set the position of the Comment Pin, the Comment Dialog might not position itself near the pin in certain scenarios like scrolling, zooming the page when the comment dialog is open.
  • Use this to manually trigger an update. The dialog will reposition itself near the pin.
You can add custom lists at two levels: a. on the CommentAnnotation and b. on the Comment. Enable a callback when users click on links rendered in comment content. When enabled, links won’t automatically open; instead an event is emitted. How to use:
  • By default linkCallback is false.
  • When false, clicking a link opens it directly and no callback is triggered.
  • When true, clicking a link does not open it; instead a linkClicked event is emitted so you can handle navigation.
Types:

commentBubbleClicked

Listen to when a comment bubble is clicked. This event is triggered whenever a user clicks on a comment bubble. You can use this to implement custom actions like navigation or analytics tracking.
Event Type: CommentBubbleClickedEvent

Extra Information

enableCommentIndex

Whether comment index is enabled. Default: false This appears in the comment sidebar and on the comment pins. When this is on, we show a small icon indicating the comment index in the order of creation date. This enables users to find and navigate to the desired comment quickly.
API Method:

enableDeviceInfo

Whether device type indicator is enabled. Default: false When this is on, we show additional information in the Comment Thread indicating which device the comment was created on. This is useful especially for design tools, where additional context is needed for debugging issues.
API Method:

enableDeviceIndicatorOnCommentPins

Whether the device type indicator on Comment Pins is enabled. Default: false When this is on, we show a small device type icon on the Comment Pin indicating which device the comment was created on. This is useful especially for design tools, where additional context is needed for debugging issues.
API Method:

enableGhostComments

Whether to show ghost comments on the DOM. Default: false Ghost comments are comments that were once linked to certain content on the DOM but that content is no longer available. If this is on, we display ghost comments in gray, close to where they were originally positioned on the DOM.
Using API methods:

enableGhostCommentsIndicator

Whether to show ghost comment labels in the comment sidebar. Default: true Ghost comments are always shown in the comments sidebar so that users can see the history of all comments. If this is on, we show a label on the comment in the sidebar indicating that the original content on which this comment was added is no longer available. This sets better expectations with the users.
Using API methods:

Special File Type Support

Iframe Container Support

  • To enable comments on an iframe, add data-velt-iframe-container="true" to the iframe’s container element.
  • Note this will not insert the comments inside the contents of the iframe, but rather on top of the iframe.

data-velt-pdf-viewer

To support comments on top of a pdf viewer, add the data-velt-pdf-viewer="true" attribute in the container element of the pdf viewer.

svgAsImg

  • By default, Velt SDK treats SVGs as layered elements.
  • If you want to treat SVGs as flat images, you can use this.
  • Default: false
Using Props:
Using API:

Keyboard Controls

enableHotkey

Whether Hotkeys are enabled or not. For now, the only hotkey supported is pressing c to enable comment mode. Default: false
Using Props:
Using API Method:

enableEnterKeyToSubmit

  • By default, pressing enter will add a new line and pressing shift + enter will submit a comment.
  • You can change this default behavior so that pressing enter will submit a comment by setting the enterKeyToSubmit property to true.
Using Props:
Using API Method:

enableDeleteOnBackspace

  • Use this to enable or disable deleting comments when backpsace key is pressed.
Default: enabled
Using Props:
Using API:

Moderation

enableModeratorMode

Whether comments require moderator approval. Default: false By default, when a user adds a comment it is visible to all authenticated users on the same document. Moderator mode makes visibility of all comments private to only admin users and the comment author. Admin users will see an approve button on the comment dialog. Once approved the comment will be visible to all users who can access the document. You can set some users as admin by setting the isAdmin property in the User object, during the identify() call.
API Method:

enableResolveStatusAccessAdminOnly

  • Restrict the resolve action to admin users and the comment author only.
Using Props:
Using API:

approveCommentAnnotation

acceptCommentAnnotation

rejectCommentAnnotation

enableSuggestionMode

Whether to enable suggestion mode to accept or reject comments. Default: false
To accept comments, set the suggestionMode attribute to true.
API Method:

enableReadOnly

Control whether comments are in read-only mode. When enabled, any features requiring user interaction (e.g., Composer, Reactions, Status) will be removed. Default: false
Using Props:
Using API:

Comment Read Status

enableSeenByUsers

Control whether the “Seen By” feature is enabled for comments. When enabled, it shows which users have seen each comment. Default: true
Using Props:
Using API:

setUnreadIndicatorMode

Whether verbose mode is enabled for unread Comments. Default: 'minimal' Unread Comments can be in minimal mode or verbose mode. In minimal mode, a small red dot indicator appears for unread Comments. In verbose mode, a larger badge with the text “UNREAD” will appear for unread Comments.
API Method:

Toggle Comment Types

enableAreaComment

Area comments allows users to draw a rectangle and attach a comment to it. Use this to enable or disable area comments. Default: true
Using Props:
Using API Method:

enablePopoverMode

For a complete setup guide for Popover mode, read here.
Whether Popover Mode is enabled. Default: false
Using API:

enableStreamMode

For a complete setup guide for Stream mode, read here.
Whether Stream Mode is enabled. Default: false
Using API:

enableTextMode

For a complete setup guide for Text mode, read here.
Whether Text Mode is enabled. Default: true
Using Props:
Using API:

enableInlineCommentMode

Whether In-line comment mode is enabled. When In-line comment mode is enabled, comments will appear under the text they are associated with in the DOM, instead of as a pop up window. Default: false

enableMultithread

  • By default comments are single threaded.
  • You can make it multithreaded by setting multiThread prop to true.
  • If you had previously used a wireframe for the comment dialog, you will need to add the multithread wireframe.
  • Default: false

collapsedRepliesPreview

When enabled, a comment dialog’s non-selected preview state shows the collapsed thread teaser (first comment, a “Show N replies…” divider, and the last comment) instead of only the first comment. Clicking the divider selects and expands the dialog in one step. API Methods: enableCollapsedRepliesPreview(), disableCollapsedRepliesPreview()
  • Params: none
  • Returns: void
Default: false
This flag is also exposed as the collapsedRepliesPreview wireframe variable (boolean, default false) on the comment dialog’s more reply slot.
Using Props:
Using API:

Comment Tool

context

  • Add context to the Velt Comment Tool component to associate custom metadata with comments created using that tool.
  • Predefine context directly within the component itself.
  • Currently, this feature is specific to popover comments. This allows you to, for example, assign unique context to each cell in a table if you place a Velt Comment Tool in each cell.
  • The context prop accepts an object with key-value pairs.

contextInPageModeComposer

Pass context data to the page mode composer when opening the comment sidebar via the comment tool. Context automatically clears when the sidebar closes. API Methods: enableContextInPageModeComposer(), disableContextInPageModeComposer()
  • Params: none
  • Returns: void
For programmatically setting context data, see setContextInPageModeComposer().

enableCommentMode

Turns Comment mode on or off. When you click on the comment tool, it turns on comment mode and user can attach comment to any element on the DOM. Using this method you can programmatically turn on the commenting mode.

onCommentModeChange

The comment mode is toggled on and off when you click on the Comment Tool.
The useCommentModeState() hook can be used to get the Comment mode without having to subscribe to changes. When the Comment mode changes, the hook return value will update.The subscription is automatically unsubscribed when the component dismounts.

enableCommentTool

Whether the Comment Tool button is Enabled. Default: true When the Comment Tool is disabled, it can not be used to leave comments. Other ways to leave comments, such as highlighting text, will also be disabled.
Using Props:
Using API methods:

disabled

Disables the comment tool and prevents users from adding new comments. This is helpful when you want to temporarily or conditionally restrict comment creation while still allowing users to view existing comments. Default: false
This prop disables the specific comment tool instance it is applied to; the disableCommentTool() API disables all comment tools globally.

enableChangeDetectionInCommentMode

  • By default, DOM Change Detection is disabled in Comment Mode for better performance.
  • You can enable it to automatically reposition comment pins when the DOM changes while in Comment Mode.
Default: false
Using Props:
Using API Method:

enablePersistentCommentMode

  • When Persistent comment mode is enabled, you can continue leave additional comments after finishing a comment.
  • When it is disabled, you will need to reclick the Comment Tool every time when you want to make a comment.
Default: false

forceCloseAllOnEsc

  • When enabled, pressing the ESC key will force close persistent comment mode even if a comment thread is currently active.
  • When disabled (default), pressing ESC will only close the active comment thread but keep persistent comment mode enabled.
  • This provides more control over the ESC key behavior in persistent comment mode.
Default: false

setPinCursorImage

You can set custom mouse cursor when the comment mode is on. The custom cursor image must be 32 x 32 pixels.
API Methods:

Minimap

enableMinimap

  • The minimap shows a bar on the edge of the screen with indicators that show where comments exist.
  • Use this to enable/disable the minimap. By default it’s disabled.
  • It can be positioned left or right. By default, it’s positioned on the right side of the screen.
Option a. Enable using config:
API Method:
Option b. Enable using Minimap Component: This offers greater flexibility to customize and position the minimap.

Inline Comments Section

sortBy and sortOrder

  • Change the default sorting order of Comments in the Inline Comments Section.
  • Params:
    • sortBy: The field to sort by. Currently supports createdAt and lastUpdated. Default: lastUpdated for multithread and createdAt for single thread.
    • sortOrder: The order to sort by. It can be asc or desc. Default: desc for multithread and asc for single thread.

multiThread

  • By default inline comment section is multithreaded.
  • You can make it single threaded by setting multiThread prop to false.
  • Default: true

commentPlaceholder, replyPlaceholder, composerPlaceholder

  • Customize placeholder text for different input fields in the inline comments section.
  • Props:
    • commentPlaceholder: Placeholder text for the main comment input field.
    • replyPlaceholder: Placeholder text for the reply input field.
    • composerPlaceholder: Placeholder text for the composer input field.
To customize placeholder text shown when editing an existing comment or reply, use editPlaceholder, editCommentPlaceholder, and editReplyPlaceholder. See VeltInlineCommentsSectionProps for details.

composerPosition

  • Change the position of the comment composer in the inline comments section to top or bottom.
  • Default: bottom

context

  • Pass a custom context object to the Inline Comments Section component.
  • The provided context will be added to any comments created in the inline comments section, allowing you to associate custom metadata with those comments.
  • Additionally, the component will filter and display only the comments that match the provided context object.
  • This dual behavior makes it easy to scope comments to specific areas of your application (e.g., specific cells in a table, dashboard widgets, or data segments).

contextOptions

  • Configure the matching behavior for the context object when filtering comments.
  • By default, comments must fully match all key-value pairs in the provided context.
  • Set partialMatch: true to enable flexible matching where comments match if they contain all the specified context fields (extra fields in the comment’s context are ignored).
  • See Context Matching for detailed explanation and examples.

readOnly

Control read-only mode at the component level. When enabled, users can view comments but cannot reply, edit, or add new comments in the Inline Comments Section. The local component prop takes precedence over global settings when explicitly set. Default: false

Popover Comments

enableDialogOnTargetElementClick

Whether the comment dialog opens when target element is clicked. This is relevant only for Popover mode. Default: true
API Method:

enablePopoverTriangleComponent

Whether the popover triangle appears when Popover Mode is enabled. Default: true
API Method:

Comment Bubble

annotationId

  • The id of the comment annotation to show the comment bubble on.
  • The bubble will be rendered only if there is a comment annotation that matches the provided annotationId in the current document.

targetElementId

  • The DOM ID of the element where comment bubble is added.
  • This binds the comment bubble to the element with the provided ID.
  • The bubble will be rendered only if there is a comment annotation that was added to the element with the provided ID.

context

  • The context object to filter which comment annotations to show the comment bubble for.
  • The bubble will be rendered only if there is a comment annotation that matches the provided context in the current document.
  • Works only with popover mode comments.
  • Perfect for complex tables with filtering and segmentation needs.
  • Set flexible comment anchoring and filtering logic at the cell level using key-value pairs.
  • Supports aggregate views: Eg: comments added in day view can appear in week/month views automatically.
  • Context commonly has combined use with context options and the group matched comments feature.

contextOptions

  • Matching behavior for the context object (default: full match, or set partialMatch: true for flexible matching).
  • How Partial Match Works:
    • A comment will match if ALL provided filter criteria exist in the comment’s context
    • Extra fields in the comment’s context don’t prevent matching
    • Missing fields in the comment’s context prevent matching
    • Example: Comment has { day: "01", week: "01", month: "jan", product: "cheese", location: "zurich" }
      • Filter { day: "01", product: "cheese" } → ✅ matches (both fields exist in comment)
      • Filter { day: "01", category: "dairy" } → ❌ no match (category doesn’t exist in comment)
  • Partial Match Examples:
    • Comment has { day: "01", week: "01", month: "jan", product: "cheese" }
    • Filter with { day: "01", week: "01", month: "jan", product: "cheese" } → matches (full)
    • Filter with { week: "01", month: "jan", product: "cheese" } → matches (partial)
    • Filter with { day: "01", week: "01", month: "jan", product: "cheese", location: "zurich" } → no match

groupMatchedComments

Whether to group multiple comment annotations in Comment Bubble component when multiple annotations match the provided context or targetElementId. Default: false
Using Props:
Using API:

commentCountType

Whether to show unread or total comment replies count on Comment Bubble Component. Type: CommentCountType
  • total: Shows the total number of replies. (default)
  • unread: Shows the number of unread replies.

openDialog

Control whether the comment dialog opens when clicking on the comment bubble. When disabled, clicking the bubble will not open the comment dialog. This is useful when you want to handle bubble clicks with custom logic using the commentBubbleClicked event. Default: true

readOnly

The readOnly flag prevents users from replying or editing existing comments in the target bubble while still displaying them. This is useful when you want to display comments in a read-only mode where users can view but not modify or respond to comments. Default: false

Video Timeline Comments

setTotalMediaLength

Set the total length of media (in frames or seconds) for the timeline.
Using Props:
Using API Method:

offset

  • Allows comment bubbles to be positioned relative to both parent and child video clips by specifying an offset value.
  • Default: 0

Comment Pin

enableBubbleOnPin

Show a Comment Bubble when user hovers or clicks on the Comment Pin vs showing the Comment Dialog. The comment dialog will open only on clicking the comment bubble. Default: 'false'
Using Props:
Using API Method:

enableBubbleOnPinHover

Show a Comment Bubble when user hovers on the Comment Pin vs clicks on it. Default: 'true'
Using Props:
Using API Method:

Legacy Methods

onCommentAdd

Using Props:
Using Hooks:
Using API:
onCommentAdd Event Data Schema
Field NameTypeDescription
addContextFunctionUse this to set custom data on the comment
annotationCommentAnnotationThe annotation that is associated with the comment that was updated
documentIdstringThe document ID where the comment was added
locationObjectThe location where the comment was added
targetAnnotationIdstringThe id of the target annotation

onCommentUpdate

Using Props:
Using Hooks:
Using API:
onCommentUpdate Event Data Schema
Field NameTypeDescription
annotationCommentAnnotationThe annotation that is associated with the comment that was updated
typestringThe type of comment that was updated
targetAnnotationIdstringThe ID of the target annotation that contains the comment that was updated
targetCommentIdnumberThe ID of the target comment that was updated
updateContextFunctionUse this to update the custom metadata on the comment annotation.

getAllCommentAnnotations

  • Get all comment annotations for a given document and location.
  • By default, it will return data for the current documentId and location.
  • Params (optional):
    • documentId: string; it will return all comments in the given documentId.
    • location: Object; it will return all comments in the given location.
Using Hooks:
Using API:
To unsubscribe from the subscription: