Skip to main content
Question

When developing a "dev" plugin, submitting the plugin for use will always result in an error

  • March 21, 2025
  • 1 reply
  • 10 views

fengchuan

此插件为官方模板

figma.codegen.on("generate", () => {
  return [
    {
      language: "HTML",
      code: `<div class="container">
          <div class="box"></div>
        </div>`,
      title: "HTML",
    },
    {
      language: "CSS",
      code: `.container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
          }
          .box {
            width: 100px;
            height: 100px;
            background-color: #000;
          }
        `,
      title: "CSS",
    },
  ];
});
{
  "name": "styleui",
  "id": "**********",
  "api": "1.0.0",
  "main": "code.js",
  "editorType": [
    "dev"
  ],
  "documentAccess": "dynamic-page",
  "networkAccess": {
    "devAllowedDomains": [
      "*"
    ],
    "reasoning": "Some style parsing requires network requests;有些样式解析需要用到网络请求",
    "allowedDomains": [
      "*"
    ]
  },
  "capabilities": [
    "codegen"
  ],
  "codegenLanguages": [
    {
      "label": "React",
      "value": "react"
    },
    {
      "label": "Typescript",
      "value": "typescript"
    }
  ]
}

 

1 reply

Harry Peng
  • New Member
  • 1 reply
  • March 31, 2025

test


Reply


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