Skip to main content
c5inco
December 19, 2021
Question

Write to Clipboard from custom plugin

Considering that document.execCommand is deprecated, what would the best way to write to the system clipboard within a custom plugin?

Right now, it’s a bit hacky where one can create a temporary HTML UI, set elements like textarea with the intended value to copy, then use document.execCommand. That will likely not be supported in the future, so ideally there’d be a nice and secure way to work with the system clipboard through a Figma API.

This topic has been closed for replies.

23 replies

Wes Byrne
New Member
May 21, 2025

Anyone have any updates here? I don’t seem to have access to the clipboard API and execCommand doesn't seem to be doing anything… 

JimB
New Member
September 3, 2025

execCommand(“copy”) works for us, but i think it has size limitations. And the only error/feedback you get from it is a boolean, so thats not great for the user experience.

Bogriceanu_Sorin
New Participant
October 2, 2025

a working Clipboard api would be nice to have as we move more and more towards AI and text based tools