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

Paragraph align text with Expressions

Participant ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

Under paragraph menu, there is an option to align text to the left, center or right. There is also an option to justify text.

How can this me done with expressions or Extendscript?

I noticed that if I set Anchor point to the top left, additional text added on the same line is left aligned. If I set anchor point to the left-center, all the lines added in the future are left justified, but current text remains as it is. Align options under paragraph don't move anchor point and also work for the text already typed.

I guess you could save the text, delete it, move anchor point, paste the text back and move anchor point back where it was to achieve the same effect. But there is probably a better way?

TOPICS
Expressions

Views

9.1K

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

correct answers 1 Correct answer

Community Expert , Aug 23, 2017 Aug 23, 2017

These options are not accessible with expressions. They are part of the text panel and stored in teh source text compound keyframes, not as separate properties. therefore the only way to address them programmatically is to use scripts. Check the script help for the various properties. Otherwise one would simply use text animators to create the illusion.

Mylenium

Likes

Translate

Translate
Community Expert ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

These options are not accessible with expressions. They are part of the text panel and stored in teh source text compound keyframes, not as separate properties. therefore the only way to address them programmatically is to use scripts. Check the script help for the various properties. Otherwise one would simply use text animators to create the illusion.

Mylenium

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
Participant ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

Hi Tim Sx

With Extendscript you can justify the following way:

var myLay = yourTextLayerGoesHere;

var txtProp = myLay.property("Source Text");

var txtDoc = txtProp.value;

txtDoc.justification = ParagraphJustification.CENTER_JUSTIFY; // change here to the value you need based on the list below

txtProp.setValue(txtDoc);

The justification can be any of the below options:

ParagraphJustification.LEFT_JUSTIFY

ParagraphJustification.RIGHT_JUSTIFY

ParagraphJustification.CENTER_JUSTIFY

ParagraphJustification.FULL_JUSTIFY_LASTLINE_LEFT

ParagraphJustification.FULL_JUSTIFY_LASTLINE_RIGHT

ParagraphJustification.FULL_JUSTIFY_LASTLINE_CENTER

ParagraphJustification.FULL_JUSTIFY_LASTLINE_FULL

I hope this helps.

Cheers

Henrique

Henrique \\ TMMW
Clips Exporter | Thumbs Up | Selector for Premiere Pro

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
Participant ,
Aug 24, 2017 Aug 24, 2017

Copy link to clipboard

Copied

Thank you both. I am learning so much.

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 Beginner ,
Apr 10, 2022 Apr 10, 2022

Copy link to clipboard

Copied

LATEST

In Ae ver. 2020 some new text properties were added in the expressions menu:

https://helpx.adobe.com/after-effects/using/expressions-text-properties.html

I still can't find a way to control the paragraph direction via code 🤔

Am I missing something or is it still not possible?

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