Skip to main content
Solved

How do I outline text through the plugin?


Tushar3

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

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

Best answer by Gleb

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.

View original

2 replies

tank666
  • 4873 replies
  • June 10, 2022

Is the stroke applied to the text layer?

Returns null if the node has no strokes.
TextNode | Plugin API


Gleb
  • Power Member
  • 4708 replies
  • Answer
  • June 10, 2022

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings