Copy link to clipboard
Copied
Hello all.
I am trying to center align the text inside my text frame with javascript, but couldn't find much documentation.
I found "StrokeAlign" property in the documentation but there is no good example how to use it.
I found the feature inside indesign (selected with red box) but not sure how to proceed
1 Correct answer
app.selection[0].justification = Justification.CENTER_ALIGN;
The justification property is found on Text, Word, Paragraph, ParagraphStyle, Character, Line, TextStyleRange, InsertionPoint and a few others: https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Justification.html
Copy link to clipboard
Copied
app.selection[0].justification = Justification.CENTER_ALIGN;
The justification property is found on Text, Word, Paragraph, ParagraphStyle, Character, Line, TextStyleRange, InsertionPoint and a few others: https://www.indesignjs.de/extendscriptAPI/indesign-latest/#Justification.html

