@finsweet/attributes-copyclip

Set any element to copy a string value to the clipboard when clicking on it.

Usage no npm install needed!

<script type="module">
  import finsweetAttributesCopyclip from 'https://cdn.skypack.dev/@finsweet/attributes-copyclip';
</script>

README

copyclip Attribute

Users can set any element to copy a string value to the clipboard when clicking on it. The script can be set by adding attributes to individual elements or by setting global attributes to the <script> tag that will affect all elements.

CDN Import

<!-- [Attributes by Finsweet] CMS Copy to Clipboard -->
<script defer src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-copyclip@1/copyclip.js"></script>