#[SOLVED] Trying to make a copy to clipboard button

3 messages · Page 1 of 1 (latest)

blissful plaza
#

Hey! So i am trying to make this copy to clipboard button, which is supposed to take an email fetched from Sanity and copy it inside the user's clipboard.

I have tried putting inside an onclick attribute on the button a function call but it didn't work due to syntax errors. I was also thinking about putting the email inside a data attribute and somehow figure out a way to copy it from there. Now I am out of ideas and I was wondering if you could give me some clues to solve this xD.

Thank you so much !astro

opaque edge
blissful plaza
#

Thank you so much!