Custom annotation

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
8.x.x.x

Detailed description of issue
Am working on custom annotation, onclick of button need to get popup with input fields

Expected behaviour
on click of the custom annotation button i need one popup with input field, below that some text fields
Does your issue happen with every document, or just one?
Yes
Link to document
{Provide a link to the document in question if possible}

Code snippet
useEffect(() => {
WebViewer(
{
path: ‘/webviewer/lib’,

        }, viewer.current).then(async instance => {

        const {Core} = instance;

        //Initially load Document
        instance.UI.loadDocument(myBase64String);
        //to load Annotations
        Core.documentViewer.addEventListener('documentLoaded', async () => {
            const xfdfString = localStorage.getItem("Annotations");
            instance.Core.annotationManager.importAnnotations(xfdfString);
        });
                    // For Pop Up
        instance.UI.contextMenuPopup.update([
                           {
                type: 'actionButton',
                label: 'Annotate',
                tooltip: 'Annotate',
                onClick: () => {
                    callAnnotations(instance);
                }
            }
        ]);
    }) //End of WebView
}, []);

function callAnnotations(instance) {
console.log(“In callAnnotations”)
//For Form Fields
instance.UI.contextMenuPopup.update([
{
label: ‘Annotate’,
tooltip: ‘Annotate’,
onClick: () => {
handleShow(instance);
}
}
]);

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi there,

Unfortunately I do not understand what you are trying to accomplish. When you say “on click of the custom annotation button”, what do you mean? What is the “custom annotation button” ? What is the use case?

Thanks,
Logan