Snippet: Make hyperlink from clipboard link

Idea by email:

I have another idea, is to make a hyperlink based on clipboard.

Let’s say you have a website in your clipboard, you highlight a word in your html document, and boom it’s a hyperlink!

…and here it is as a snippet:

// #popclip
// name: Hyperlink
// icon: iconify:mdi:link-variant-plus
// after: paste-result
// language: javascript
return `<a href="${pasteboard.text}">${popclip.input.text}</a>`

The above block is a PopClip extension snippet. Select it as text to install it in PopClip.