For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mentions

To make the realtime collaboration flow even better, WebViewer provides APIs that can be used to capture mentions in the notes panel. The mentions contain the data that can be sent to a server, and notify other users in the same collaboration session.

Import user data into the viewer

The first thing to enable the mentions feature in the viewer is to import user data using setUserData.

Provide a callback function to lookup users

Instead of providing a hardcoded list and setting user data, you can provide a callback function that will look up the users based on the user entry.

Listen to the mentionChanged event to capture mentions in a comment

The instance.UI.mentions instance exposes a mentionChanged event that works in a very similar way as annotationChanged. This event will be triggered whenever a mention is added, modified, or deleted from the notes panel.

Set the allowed trailing characters

By default, a user name won't be considered as a mention if it is followed by any characters except a space, but this setting can be changed by using the setAllowedTrailingCharacters API

Last updated

Was this helpful?