Get selected annotation id for modal

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
8.7.0

Detailed description of issue
Can you provide a code sample to get the id of the currently selected annotation? I want to pass this to an external modal via querystring to bind the id of the annotation with an id from our own system.

Expected behaviour

Untitled
Modal in action with our system id displayed.

Code snippet
Untitled1

Hi there,

Thanks for reaching out to pdf.js express forums,

You can find the properties for an annotation here:
https://pdfjs.express/api/Core.Annotations.Annotation.html

const documentViewer = instance.Core.documentViewer;
const annotationManager = documentViewer.getAnnotationManager();
const selectedAnnotation = annotationManager.getSelectedAnnotations()[0]
selectedAnnotation.Id

Best regards,
Kevin Kim

Hi Kevin, yes that was it thanks.

Best regards.