Skip to content

How can I automatically paste a copied link from clipboard without any keypress? #297

Answered by Kholid060
eduard-buta asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Tried using two Trigger Event blocks. The first one focuses the field so I can type. And the second was supposed to emulate the CTRL+V keypress combo so I can paste my clipboard value. Couldn't make it work in any way I tried.

The trigger event block only dispatches the selected event to the element, it doesn't execute keyboard shortcuts.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@eduard-buta
Comment options

@Kholid060
Comment options

Answer selected by eduard-buta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants