How do I outline text through the plugin?

With a text item selected I ran the below command. But it doesn’t work. And the returns null.

figma.currentPage.selection[0].outlineStroke()

Is the stroke applied to the text layer?

Returns null if the node has no strokes.
TextNode · Figma Plugins

You probably want to use flatten instead. I have no idea where people got the idea that you need to use outline stroke on text… But I guess the main thing it works, at least in the editor. Not in the API though it seems.

1 Like