Copy link to clipboard
Copied
Hi there,
i am quite new to scripting and I am looking for a way to add line breaks in the text in textboxes which are then transferred to the text layers in a comp.
So I created a UI with several textboxes in which the user can type in text. This text is then copied into the text layers in several comps. I would like the user to decide where he wants a line break. My idea would be if he types in specific characters then there is a line break.
For example if he types in: "First line +++ Second Line." The script then replaces the "+++" with a line break and the line break would be after "First line". Is this possible? Or is there another way to insert line breaks?
Thanks a lot for your help!
You can use multiline on the edittext creation properies:
var multiLineTextBox = container.add("edittext", undefined, "", {multiline: true})
Copy link to clipboard
Copied
You can use multiline on the edittext creation properies:
var multiLineTextBox = container.add("edittext", undefined, "", {multiline: true})
Copy link to clipboard
Copied
Cool, thanks a lot! That works. I didn't know about that one
Find more inspiration, events, and resources on the new Adobe Community
Explore Now