Skip to main content

Versions

Added the Option to Add Manual Comment with Context

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);
ManualCommentAnnotationConfig Class:
export class ManualCommentAnnotationConfig {
  context?: any;
}

Added onCommentClick Callback

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>
I