How can I automatically paste a copied link from clipboard without any keypress? #297
-
Hi, I'm trying to paste a link from my clipboard into an input field automatically. So far, I've thought of two methods of doing this, but couldn't make any work:
Please help me out if you've got a quick fix to this. I'm totally lost. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can use javascript code to access the copied link from the clipboard. navigator.clipboard.readText().then((link) => {
alert(link);
}); But to use the above code, you need to allow the targeted website to access the clipboard.
The trigger event block only dispatches the selected event to the element, it doesn't execute keyboard shortcuts. |
Beta Was this translation helpful? Give feedback.
You can use javascript code to access the copied link from the clipboard.
But to use the above code, you need to allow the targeted website to access the clipboard.
The trigger event block only dispatches the selected event to the element, it doesn't execute keyboard shortcuts.