setTextJust

Syntax: setTextJust document, justCode(s)

The setTextJust command sets the line justification applied to all subsequently added text elements. Possible values are:

left
right
centered 

Justification applies to an entire text block (or the set of linked text blocks), so if you set justification to "right" and call append for a block that was previously centered, the justification of the entire block will be changed to right-justified as the new text is added.