Jump to content

Setting up a clipboard.js button

Recommended Posts

Posted

I'd like to have a button that matches the others on my site template (small, left aligned), but instead of linking to another page, I'd like this button to copy a piece of text to the clipboard.

Enter clipboard.js. I believe I've uploaded the javascript properly - as a "file" link under unlinked pages). Under header code injection I've configured:


<!-- Plugin Clipboard.js -->
<script src="mydomain.net/clipboard.min.js">
</script>
<!-- end Plugin Clipboard.js -->

But I'm lost on how to actually get it working using a squarespace-styled button.

Your advice is greatly appreciated!

  • Replies 0
  • Views 1.5k
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.