Complete the code to start a find operation in Figma.
figma.currentPage.findAll(n => n.[1] === 'Button')
Use name to find nodes by their name in Figma.
Complete the code to replace text in all found nodes.
for (const node of nodes) { if (node.type === 'TEXT') { node.characters = [1]; } }
To replace text, use node.characters.replace('Old', 'New') to compute the new content and assign it back to node.characters.
Fix the error in the code to find and replace text across files.
const nodes = figma.root.findAll(n => n.type === 'TEXT' && n.characters.includes([1]));
The search string must be a quoted string literal like 'OldText'.
Fill both blanks to filter text nodes and replace their content.
const textNodes = figma.root.findAll(n => n.type === [1] && n.characters.includes([2]));
Use 'TEXT' to filter text nodes and 'Old' as the search string.
Fill all three blanks to find text nodes, check for old text, and replace it.
const nodes = figma.root.findAll(n => n.type === [1] && n.characters.includes([2])); for (const node of nodes) { node.characters = node.characters.replace([3], 'NewText'); }
Use 'TEXT' for node type, 'OldText' as string to check, and /OldText/g as regex to replace all occurrences.
