I created a small plugin for creating Tables. I hope to create and access a small data Figma file in the community space to save the Table’s data styles that the table needs to use, and then how can I read the file?
In fact, this is a problem with reading files across files in Figma API. I wish any expert can enlight us, or give some clues and hints.
for example, can access it and clone it, but how to clone it? Which function I can use?
Here is the Screenshot, it is ugly because this plugin only can work but bounding one static Figma file, I hope it can work in any Figma file without any limitation
Plugins can only work within the limits of one file. The most you can do is import components from other files (libraries), and even then you have to know the component keys first, which you can’t get without opening the plugin in the library file first.
Hi, Master Gleb, Thank you for coming,
Could I know which function should I use to get the component keys? I have already hung up a Figma file with full edit permissions in a URL, and already put all resource frames into it.
Could you let me know where is the introduction of this function?
Edit permissions and URLs have nothing to do with plugins. Open the file, open the plugin in that file, scan the file for the component you need (using something like
root.findAll for example) and then get the key via