How to customize the text selection tooltip

Hi,

The instance comes from the promise returned by the initialization function.

import WebViewer from '@pdftron/pdfjs-express'

WebViewer({
   ...options
}).then(instance => {

   instance.textPopup.add({
    type: 'actionButton',
    onClick: () => console.log('test'),
    img: '' // this can be a path to an image, or an SVG as a string
  })

})

You can just call that code as soon as WebViewer is done initializing.