I’ve been working on a plugin for Penpot, and I’ve hit a roadblock with clipboard functionality. The plugin’s iframe permissions policy blocks me from using navigator.clipboard.writeText.
Since the plugin manifest.json file includes a “permissions” section, I wonder if we could get a “clipboard” permission. If this could enable clipboard access (or at least make it configurable for plugin developers), it’d solve a major limitation.
Here’s what I’ve tried so far, but nothing worked:
- Falling back to document.execCommand(“copy”) → No luck.
- Sending data to the parent frame with postMessage → Couldn’t access window, parent, or navigator.
It feels like I’ve thrown everything at the wall, but clipboard access is still out of reach. Adding a clipboard option in the permissions section of the manifest.json would be a game-changer.
What do you think? Is this something that could be supported?
Thanks!