Hi,
We need to customize the text selection tooltip. We need to add one more action/option in that. So How can we do that. Please provide guidelines regarding that.
Thanks!
Hi, Thanks a lot.
But can you please share me how to get the instance and where the event generating after selected some text.
Means where i need to add the code given by you.
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.