只需几个简单步骤,即可在您的项目中使用 Copy to Design SDK
pnpm install @refore-ai/copy-to-design-sdk
import { CopyToDesign, PlatformType } from '@refore-ai/copy-to-design-sdk';
const copyToDesign = new CopyToDesign({
key: '<YOUR_KEY>',
});
const html = '<html><body>Here is my content</body></html>';
await copyToDesign.copyToClipboardFromHTML(html, {
width: 1920,
height: 1080,
platform: PlatformType.Figma,
});