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
Within the comment element, we have introduced addManualComment method to add manual comment with context.
API Method:
React / Next.js
Other Frameworks
const commentElement = client.getCommentElement();
const config: ManualCommentAnnotationConfig = {
context: {}, // your context here
};
commentElement.addManualComment(config);
const commentElement = Velt.getCommentElement();
const config: ManualCommentAnnotationConfig = {
context: {}, // your context here
};
commentElement.addManualComment(config);
ManualCommentAnnotationConfig Class:
export class ManualCommentAnnotationConfig {
context?: any;
}
We have added onCommentClick callback in velt-comment-thread component.
React / Next.js
Other Frameworks
<velt-comment-thread annotation-id="COMMENT_ANNOTATION_ID"></velt-comment-thread>
<script>
const commentThreadTag = document.querySelector("velt-comment-thread");
commentThreadTag.addEventListener('onCommentClick', (event) => {
console.log('onCommentClick', event.detail);
});
</script>
<VeltCommentThread
annotationId="COMMENT_ANNOTATION_ID"
onCommentClick={(data) => handleOnCommentClick(data)}
/>