set_text_range
Apply inline rich text formatting to specific character ranges in a Figma text node, including font, color, hyperlinks, and list styles.
Instructions
Style character ranges of an existing TEXT node — the write-side mirror of a read segment, for inline rich text (a link inside a sentence, a bold word, a coloured span, a bulleted list, a smaller /mo after a price). Each range gives start/end (char offsets into the node's characters) plus any subset of run properties: fontName / fontSize / fills / textDecoration / textCase / lineHeight / letterSpacing / hyperlink / listOptions / indentation, and design-system bindings textStyleId / fillStyleId / boundVariables. Ranges apply in order (a later range overrides an earlier one on overlap). Fonts are loaded automatically. Set the whole node first with create_text / set_text; use set_text_properties for node-level typography & overflow. Returns { ok, nodeId }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | TEXT node id whose ranges to style | |
| ranges | Yes | Character ranges + the run properties to apply to each |