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

@ -41,7 +41,6 @@ function getViewerConfiguration() {
appContainer: document.body,
mainContainer,
viewerContainer: document.getElementById("viewer"),
hiddenCopyElement: document.getElementById("hiddenCopyElement"),
toolbar: {
mainContainer,
container: document.getElementById("floatingToolbar"),