We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afd9e32 commit 16d38a0Copy full SHA for 16d38a0
view/view.twig
@@ -19,11 +19,10 @@
19
20
{# COPY TO CLIPBOARD SCRIPT #}
21
<script>
22
- document.getElementById('copy-button').addEventListener('click', function() {
23
- var content = document.getElementById('content').innerText;
24
- navigator.clipboard.writeText(content).then(function() {
25
- console.log('Copied to clipboard!');
26
- }).catch(function(error) {
+ document.getElementById('copy-button').addEventListener('click', function () {
+ var content = document.getElementById('content').textContent.trim();
+ navigator.clipboard.writeText(content).then(function () {
+ }).catch(function (error) {
27
console.log('Copy failed: ' + error);
28
});
29
0 commit comments