Skip to main content
July 20, 2023
Solved

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

  • July 20, 2023
  • 8 replies
  • 1866 views

For example:

$19.99
/month

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

This topic has been closed for replies.
Best answer by David

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

Figma

8 replies

David
DavidAnswer
New Participant
July 20, 2023

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

Figma
July 20, 2023

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

David
New Participant
July 20, 2023

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.

github.com
July 20, 2023

cool. thank you.

Vincent_Huss
Active Member
March 28, 2024

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

fengweiyao
New Member
September 10, 2024

@Vincent_Huss hi, do you have any solution now? i have the same issue.

Vincent_Huss
Active Member
September 11, 2024

no, i gave up on that feature,

it doesn’t seem like Figma provides any hook for that information 😕

maybe something to consider as a feature request @Figma_Product ?

=> for a text node : providing a list of bounding box for each lines

James_Yang
Figmate
Figmate
September 11, 2024

There was another thread on something similar from earlier this year: Methods and/or Properties for Getting Dimensions of Lines of Text within Text Node?