Forum Post
I’m building a Designer Extension (iframe-based) that enables users to copy commerce components and paste them into Webflow Designer. I’m blocked by browser Permissions Policy restrictions that prevent clipboard writes from iframe-based extensions.
Use Case
The extension provides a component library where users can browse and copy pre-built components (cart pages, checkout forms, etc.) to paste into Webflow Designer. This is a common workflow similar to other component library apps.
Technical Challenge
When users click “Copy Component” in the extension, I need to write Webflow’s @webflow/XscpData JSON to the clipboard with the application/json MIME type. However, I’m encountering:
NotAllowedError: Failed to execute ‘write’ on ‘Clipboard’: The Clipboard API has been blocked because of a permissions policy applied to the current document.
This is expected behavior—browser security prevents iframe-based extensions from accessing the clipboard without explicit permissions.
What I’ve Tried
-
Direct Clipboard API: navigator.clipboard.write() with ClipboardItem - blocked by Permissions Policy
-
execCommand fallback: document.execCommand(‘copy’) - also blocked from iframe context
-
postMessage bridge: Attempted to communicate with a top-level script, but Custom Code only affects published sites, not the Designer
-
Designer API insertion: I have insertion code using window.webflow APIs (as documented in Designer APIs: Introduction | Webflow Developer Documentation ), but encountered reliability issues with complex components (element invalidation, timeouts)
-
Reviewed Designer APIs documentation: I’ve checked the Designer APIs docs but didn’t find an official clipboard API method for extensions
Research Findings
-
I’ve verified that other Webflow apps successfully enable copy-paste from their iframe-based extensions
-
These apps don’t require users to install custom code or browser extensions
-
The clipboard data format (@webflow/XscpData) is correct - I’ve verified it matches what Webflow Designer expects
-
Some apps’ iframes don’t have explicit allow=“clipboard-write” attributes, suggesting permissions may be granted programmatically
-
This appears to be a common need - there are multiple forum discussions about component libraries needing copy-paste functionality
Questions
-
Is there an official way for Designer Extensions to write clipboard data?
-
Can Webflow grant clipboard-write permissions to approved extensions?
-
Is there a Designer API method we should use instead of clipboard?
-
What’s the recommended approach for enabling copy-paste functionality from Designer Extensions?
Any guidance or insights would be greatly appreciated. Thank you!