-
Multiple lines to a single line
Hey hive-mind,
I don’t know if this is possible, but I thought I’d ask anyway.
I have a text layer with multiple lines of text that looks like this:
“Line1
Line2
Line3
Line4
Line5”I’d like to use an expression to force this into the following format:
“Line1, Line2, Line3, Line4, Line5 ”The catch is that the number of lines is variable in our workflow.
I’m able to retrieve the number of lines using the expression below, but I’m struggling with storing each line in an array and then “adding” all the elements of the array up. Don’t even know if this is possible, but any help would be appreciated.thisLayer.text.sourceText.split(/\n|\r/).length;Lead VFX and Motion Design at Tomorrowland NZ