Documentation Index
Fetch the complete documentation index at: https://docs.velt.dev/llms.txt
Use this file to discover all available pages before exploring further.
Versions
Introducing the getElementRefByAnnotationId() method that returns the XPath of the DOM element where the specified comment was added.
const commentElement = client.getCommentElement();
let elementRef = commentElement.getElementRefByAnnotationId('annotationId')
Added the scrollToCommentByAnnotationId() method that scrolls the page to the specified element where the comment was added. This functionality is contingent upon the presence of the element in the DOM.
const commentElement = client.getCommentElement();
commentElement.scrollToCommentByAnnotationId('annotationId')
Live selection style configuration
Added the ability to customize the styling of Live Selection by passing a style object to the data-live-selection-config attribute.
/**
* live selection configuration:
* position:
* - horizontal: 'left'
* border:
* - border: false
*/
<p data-live-selection-enabled="true"
data-live-selection-config='{ "horizontal": "left", "border": false }'
contenteditable="true">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum, consequatur.
</p>
Event Handler for Click Events on Presence Users
Implemented the onPresenceUserClick event handler for click events on Presence avatar circles.
const onPresenceUserClickEvent = (user) => {
console.log("Clicked presence user: ", user);
}
<VeltPresence onPresenceUserClick={(user) => onPresenceUserClickEvent(user)} />
Option to disclude current user from list of Presence Users
The self property can be used to include or disclude the current user from the list of Presence users. By default the current user is added.
<VeltPresence self={false} />
API Method:
const presenceElement = client.getPresenceElement();
presenceElement.enableSelf();
presenceElement.disableSelf();