Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Add line break in textbox

New Here ,
Aug 20, 2019 Aug 20, 2019

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!

TOPICS
Scripting
4.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Aug 20, 2019 Aug 20, 2019

You can use multiline on the edittext creation properies:

var multiLineTextBox = container.add("edittext", undefined, "", {multiline: true})

Translate
Participant ,
Aug 20, 2019 Aug 20, 2019

You can use multiline on the edittext creation properies:

var multiLineTextBox = container.add("edittext", undefined, "", {multiline: true})

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 20, 2019 Aug 20, 2019
LATEST

Cool, thanks a lot! That works. I didn't know about that one

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines