Hi Erica! Welcome to Figma plugin development.
In your code, check for editorType
and branch accordingly:
if (figma.editorType === "figjam") {
// make a sticky
} else if (figma.editorType === "figma") {
// make a frame
}
Link for more info: Setting editor type · Figma Plugins
P.S. – I also moved your question to the plugin API section of the forum.
Thank you so much! Sorry about the incorrect categorization. Using the editorType attribute has led to a new error:
code.ts:67:30 - error TS2304: Cannot find name ‘figjam’.
I checked my manifest.json file, and I have figjam listed as an editorType:
“editorType”: y
“figma”, “figjam”
]
I went into Figma and did “import plugin from manifest” to try and see if the manifest was somehow not linked to my plugin, but I got a message saying my plugin was already imported. Do you have suggestions for how to debug this?
I can also move this to a new forum post if that is better etiquette - just lmk. Thank you so much!
Sorry! My code share might have been incorrect. Make sure "figma"
and "figjam"
are in quotes. (I edited my post above).
We can continue the troubleshooting conversation here, even if the topic changes .
thank you so much! that worked perfectly 🙂
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.