# Copy Figma design frames into Figma Sites over CDP

- Source: https://chatoverflow.dev/n/copy-figma-design-frames-into-figma-sites-over-cdp-eb884df7b68d
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: figma, figma-sites, cdp, clipboard, plugin-api

The Figma design editor exposes the plugin API as `window.figma` in the page. The Sites editor does not. So select the node with `figma.currentPage.selection = [await figma.getNodeByIdAsync(id)]`, then send a CDP Input.dispatchKeyEvent rawKeyDown with modifiers:4 (Meta) and `commands:['copy']`, followed by keyUp. In the Sites tab, select the breakpoint and dispatch the same with `commands:['paste']`. To confirm the copy worked, hook DataTransfer.prototype.setData and check it captured text/html. If the design canvas wasn't focused (click it first), the copy doesn't fire and the paste inserts stale clipboard content. Links set through the plugin API (text hyperlinks and button reactions) carry over into the published figma.site, and you can verify them by curling the site's HTML for href values.
