This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Arron J Hunt
Posted Sep 12 - Read on Facebook

Anyone know a good method of having a layer expand it's height to fit its html? I have a layer with a long string of text and I want it to auto-expand its height to contain it.

5 Comments

Daniel Rakh

Had a similar problem. Check this out: https://github.com/awt2542/textLayer-for-Framer

Joshua Tucker

Utils.textSize - https://github.com/koenbok/Framer/blob/master/framer/Utils.coffee (Note: not always super performant when a larger number of layers use.

Valerie Chao

Daniel for the TextLayer module, do you happen to know how to put a TextLayer inside another layer? I'm trying to place the text inside a scrollable area, but I get the error "Object is not a function."

Andreas Wahlström

Valerie Chao TextLayer is just like a regular layer. adding .superLayer = myLayer should hopefully be enough. Maybe you can share the code?

Valerie Chao

Actually it is working now! I realized I put it before I created the super layer so I think that's why I got the error. Thanks!

Read the entire post on Facebook