-
Checking text field for line breaks?
Hi there!
I’m trying to create some auto formatting for a mograph template that’ll be handed off to an editor, and I’m running into a problem I’m not sure how to solve. Hopefully you expression wizards out there (I’m looking at you, Dan ☺ ) can help me out with the syntax. What I’m looking for is a way to check a text field for line breaks.
Basically, I’ve got a bullet-point list of items that I want to let the editor edit, while the line spacing between items in the list automatically controlled with expressions based on the number of items in the list and the size of the font. This works great when the items in the list are only one line of text, but if any of these lines of text need to be two lines, my auto-formatting gets all screwed up. So, I’d like to write an expression that checks the text field for a line break, and if it finds one, adds padding to the space between that text field and the next one on the list. I know how to calculate and apply the right sized padding, but I just can’t figure out how to check a text field for line breaks. Is that possible? And if so, what’s the syntax for something like that?
Thanks!