Complete the code to open the Figma plugin menu.
figma.showUI(__html__, { width: 240, height: 320 });
figma.ui.postMessage({ type: '[1]' });The message type open-plugin-menu triggers the plugin menu to open in Figma.
Complete the code to install a plugin by its ID.
await figma.clientStorage.setAsync('pluginId', '[1]');
The plugin ID is usually a string like com.figma.plugin.example that uniquely identifies the plugin.
Fix the error in the code to uninstall a plugin.
await figma.clientStorage.[1]('pluginId');
The correct method to remove a stored item is removeAsync.
Fill both blanks to load and run a plugin by its ID.
const pluginId = '[1]'; figma.[2](pluginId);
You need the plugin ID string and the method runPluginById to run the plugin.
Fill all three blanks to check if a plugin is installed, install it if not, and then run it.
const pluginId = '[1]'; const installed = await figma.clientStorage.getAsync(pluginId); if (!installed) { await figma.clientStorage.setAsync(pluginId, true); } figma.[2](pluginId); figma.ui.postMessage({ type: '[3]' });
The plugin ID is needed first, then runPluginById runs it, and the message type plugin-installed confirms installation.
