Create the "hiddenCopyElement" in the PDFViewer constructor (PR 16286 follow-up)

To make this functionality work out-of-the-box in custom implementations, see e.g. the "viewer components" examples, it'd be slightly easier if we dynamically create/insert the "hiddenCopyElement" in the `PDFViewer` constructor.
Given that the "copy all text" feature still appears to work just as before with this patch, hopefully I'm not overlooking any reason why doing this would be a bad idea.
This commit is contained in:
Jonas Jenwald 2023-04-16 09:07:22 +02:00
parent 92baf14531
commit 2fbbdd68cc
6 changed files with 5 additions and 8 deletions

View file

@ -504,7 +504,6 @@ const PDFViewerApplication = {
this.pdfViewer = new PDFViewer({
container,
viewer,
hiddenCopyElement: appConfig.hiddenCopyElement,
eventBus,
renderingQueue: pdfRenderingQueue,
linkService: pdfLinkService,