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

How can text in staticTexts.add automatically wrap based on a specified width?

Guide ,
Sep 11, 2025 Sep 11, 2025
staticTexts.add({ staticLabel: "Doesn't the text inside automatically wrap to new lines?" });

Doesn't the text inside automatically wrap to new lines? Setting the width doesn't seem to work either.
I think I've seen people use jion(\n) to control line breaks.

dublove_0-1757578139818.jpeg

 

TOPICS
How to , Scripting
93
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 2 Correct answers

Community Expert , Sep 11, 2025 Sep 11, 2025

Several times people have pointed out to you that you should use the multiLine property.

See https://creativepro.com/files/kahrel/indesign/scriptui.html for details and examples.

Translate
Community Expert , Sep 11, 2025 Sep 11, 2025

Adding `mutiline:true` directly to my original code didn't work.

 

That’s because the DialogRow or DialogColumn StaticText class does not have a mutiline property

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#StaticText.html#d1e593633

 

You probably can do it with the ScriptUI Classes—don’t confuse the ScriptUI Classes with the InDesign Dialog Class they are not the same. ScriptUI is here:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#WindowSUI.html

 

 

 

 

Translate
Community Expert ,
Sep 11, 2025 Sep 11, 2025

Several times people have pointed out to you that you should use the multiLine property.

See https://creativepro.com/files/kahrel/indesign/scriptui.html for details and examples.

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
Guide ,
Sep 11, 2025 Sep 11, 2025

Thank you.

Adding `mutiline:true` directly to my original code didn't work.
It seems I need to rebuild the dialog from scratch.
I'll look into it later.

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
Community Expert ,
Sep 11, 2025 Sep 11, 2025
LATEST

Adding `mutiline:true` directly to my original code didn't work.

 

That’s because the DialogRow or DialogColumn StaticText class does not have a mutiline property

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#StaticText.html#d1e593633

 

You probably can do it with the ScriptUI Classes—don’t confuse the ScriptUI Classes with the InDesign Dialog Class they are not the same. ScriptUI is here:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#WindowSUI.html

 

 

 

 

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