fix #112 and differentiate between textContent and innerText

This commit is contained in:
schlagmichdoch 2023-05-26 20:24:29 +02:00
parent 27bf0fa74f
commit 520b772bc8
4 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,7 @@ if (!navigator.clipboard) {
// A <span> contains the text to copy
const span = document.createElement('span');
span.textContent = text;
span.innerText = text;
span.style.whiteSpace = 'pre'; // Preserve consecutive spaces and newlines
// Paint the span outside the viewport