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

Area Type Option

Adobe Employee ,
Nov 03, 2022 Nov 03, 2022

Copy link to clipboard

Copied

Using JSX, how can we set Area Type Option as Justify on Any Text Object?

TOPICS
Scripting

Views

75

Likes

Translate

Translate

Report

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
Advisor ,
Nov 03, 2022 Nov 03, 2022

Copy link to clipboard

Copied

 

Justification is a paragraph property.

// select text frame
app.selection[0].textRange.paragraphAttributes.justification = Justification.CENTER;

Other options are RIGHT, LEFT, FULLJUSTIFY, et cetera.

 

Likes

Translate

Translate

Report

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
Adobe Employee ,
Nov 09, 2022 Nov 09, 2022

Copy link to clipboard

Copied

I need to set the Justify from Type > Area Type Options >>Horizontal : Justify.
Look at the sceenshot attcahed.
Above API is Paragraph property which sets the Text "Justify".

S_goel_0-1667987989401.png

 

Likes

Translate

Translate

Report

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 ,
Nov 09, 2022 Nov 09, 2022

Copy link to clipboard

Copied

LATEST

Hi
I hope I'm wrong, but I'm afraid there is no equivalent in JS.
You can read and change under a few things in the options, e.g. the baseline.

 

// set Area text baseline options
// carlos canto
// https://community.adobe.com/t5/illustrator/text-frame-area-type-options-basline-options-and-baseline-offset/td-p/11045221?page=1

selection[0].firstBaseline = FirstBaselineType.BASELINECAPHEIGHT;
selection[0].firstBaselineMin = 20;

 

---------------------------------------------------------------------------------------------------------

A vague possibility (not tested):
It might be possible to record the alignment in an action and include that action in JS.

Likes

Translate

Translate

Report

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