Add line break in textbox

guest

Member
Sep 13, 2019
37
2
8
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!
 

aedownload

Administrator
Staff member
Aug 28, 2019
74
1
18
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})