Complete the code to generate placeholder text using a Lorem Ipsum plugin.
const placeholderText = figma.plugins.[1]('paragraph');
The loremIpsum function is the correct method to generate placeholder text in Figma plugins.
Complete the code to insert an icon from the icon plugin into the current Figma document.
figma.currentPage.appendChild(figma.plugins.[1]('iconName'));
The createIcon method is used to create and insert an icon node in Figma plugins.
Fix the error in the code to correctly generate 3 paragraphs of Lorem Ipsum text.
const text = figma.plugins.loremIpsum({ count: [1] });The count property expects a number, so 3 without quotes is correct.
Fill both blanks to create a dictionary mapping icon names to their SVG data using the icon plugin.
const icons = { [1]: figma.plugins.createIcon([2]) };Both blanks require the string 'home' to map the icon name to the created icon.
Fill all three blanks to generate 5 icons named 'star' and add them to the current page.
for(let i = 0; i < [1]; i++) { const icon = figma.plugins.[2]('[3]'); figma.currentPage.appendChild(icon); }
We loop 5 times, use createIcon to generate the icon, and specify 'star' as the icon name.