The PDFCommentAnnotation component enables comment functionality on editor annotations, allowing users to add, view, edit, and delete comments associated with annotations on the PDF page.
The PDFCommentAnnotation component works alongside any editor type (Highlight, Ink, Stamp). It provides the comment popup UI and handles the comment creation flow.
The PDFCommentAnnotation component renders a built-in comment popup that appears when users interact with annotations that have comments. The popup displays:
The comment creation date
The comment text content
Edit and delete buttons (visible when the comment is selected)
The popup supports both hover and click interactions:
Hover: Shows the comment popup temporarily
Click: Selects the comment popup, keeping it visible and showing edit/delete controls
Comment
The
PDFCommentAnnotationcomponent enables comment functionality on editor annotations, allowing users to add, view, edit, and delete comments associated with annotations on the PDF page.Import
Usage
INFO
The
PDFCommentAnnotationcomponent works alongside any editor type (Highlight, Ink, Stamp). It provides the comment popup UI and handles the comment creation flow.Events
comment
Emitted when an editor annotation requests a comment to be added. The callback must be invoked with the comment text.
editorAnnotationEditorcallbackFunctionnullto cancelTIP
You can implement a custom comment dialog or modal instead of using
prompt. Just call thecallbackwith the comment text when the user submits.removed
Emitted when a comment is deleted from an editor annotation.
editorAnnotationEditorComment Popup
The
PDFCommentAnnotationcomponent renders a built-in comment popup that appears when users interact with annotations that have comments. The popup displays:The popup supports both hover and click interactions: