Skip to main content
Question

Read clipboard data on button click


chesterhow

Hi folks! From my understanding, plugins cannot access window.clipboardData or navigator.clipboard. And so the only way to read clipboard data from a button click is to use window.execCommand("paste") and listen for paste events.

While this approach works fine when running Figma via the desktop app, it will not work reliably when running Figma from within a browser (as window.execCommand has been deprecated).

I’m wondering if there are alternative methods to reading clipboard data that will work reliably in both the desktop app and within browsers.

Thank you!

This topic has been closed for comments

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings