Highlighted

align text right in textframe (in script)

Explorer ,
May 30, 2020

Copy link to clipboard

Copied

Hi,

(scripting)

a) How align text in textframe to the Right?

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Run the following code with a selected textframe

app.selection[0].parentStory.justification = Justification.RIGHT_ALIGN

 

If right justified is needed then use the following value for assignment 

Justification.RIGHT_JUSTIFIED

 

The different values that can be used are mentioned in the following link

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

 

-Manan

Topics

Scripting

Views

384

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

align text right in textframe (in script)

Explorer ,
May 30, 2020

Copy link to clipboard

Copied

Hi,

(scripting)

a) How align text in textframe to the Right?

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Run the following code with a selected textframe

app.selection[0].parentStory.justification = Justification.RIGHT_ALIGN

 

If right justified is needed then use the following value for assignment 

Justification.RIGHT_JUSTIFIED

 

The different values that can be used are mentioned in the following link

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

 

-Manan

Topics

Scripting

Views

385

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
May 30, 2020 0
Adobe Community Professional ,
May 30, 2020

Copy link to clipboard

Copied

Run the following code with a selected textframe

app.selection[0].parentStory.justification = Justification.RIGHT_ALIGN

 

If right justified is needed then use the following value for assignment 

Justification.RIGHT_JUSTIFIED

 

The different values that can be used are mentioned in the following link

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

 

-Manan

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
Reply
Loading...
May 30, 2020 1
Adobe Community Professional ,
May 30, 2020

Copy link to clipboard

Copied

Note that Manan's solution would do the alignment to every paragraph is all text frames linked to the text frame in question. If you just want to hit the paragraphs in a specific text frame, with the frame selected: 

app.selection[0].paragraphs.everyItem().justification = Justification.RIGHT_ALIGN;

 

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
Reply
Loading...
May 30, 2020 1
Explorer ,
May 31, 2020

Copy link to clipboard

Copied

Manan & Brian

Thanks... understand... it works like I want!

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
Reply
Loading...
May 31, 2020 0