Streaming live at 10am (PST)

Trying to implement

Hi I am trying to implement click to copy text to clip board.
I cloned and looked at this project:

I am using something similar in library> color

But in the above project they have an explicit html embed button to copy text

I want the entire color itself to be tappable and send the hexcode to clipboard.js
right now when i use custom attribute it is simply sending the word “hexcode” and parsing it through the script file.

is there a way to point to a specific entry in a collection via custom attributes? rather than just send the text literally?

Here is my site Read-Only:
(how to share your site Read-Only link)


var clipboard = new Clipboard('.btn');


var clipboard = new Clipboard('.btn', {
    text: trigger => trigger.querySelector('.colorhex').innerText

Also, feel free to contact me for further code help and/or customization of third-party plugins.

Thanks a mil. @samliew
Works perfectly now.