Is it possible to split a text layer into two or more layers?

For example:

$19.99
/month

separate it into two layers where $19.99 is one layer and /month is another

There are existing plugins which have this functionality. Here’s one example:

Im aware of that. I want know how to do it through the plugin api.

1 Like

One of the currently available plugins has their source code available on GitHub. Take a look through there to see how they are handling it.

1 Like

cool. thank you.

he’s only doing a split(‘\n’)
not handling :

  • the weird L-SEP char that appear if user does shift+ENTER (known issue)
  • natural text wrapping

anyone knows if the Figma API provides any sorts of info about the lines of text generated by the text engine ? i really can’t find anything