The ParagraphStyle object represents the paragraph style of a text item (textRange.paragraphStyle) or a text range (textRange.paragraphStyle).
Sample code:
var text = new PointText(new Point(0,0)); text.content = 'Hello world.'; text.paragraphStyle.justification = 'center';
Constructors
Properties
Justification
The justification of the paragraph.
- Returns:
- String ('left', 'right', 'center', 'full-last-line-left', 'full-last-line-right', 'full-last-line-center', 'full')
The single word justification of the paragraph.
- Returns:
- String ('left', 'right', 'center', 'full-last-line-left', 'full-last-line-right', 'full-last-line-center', 'full')
Indentation
The indentation of the first line in the paragraph.
- Returns:
- Number
The indentation at the left of the paragraph.
- Returns:
- Number
Spacing
The space before the paragraph.
- Returns:
- Number
The space after the paragraph.
- Returns:
- Number
Hyphenation
Specifies whether to use hyphenation within the paragraph
- Returns:
- Boolean — true if the paragraph uses hyphenation, false otherwise
The minimum number of characters that a word needs to have to be able to be hyphenated.
- Returns:
- Number
The minimum number of characters at the beginning of a word that can be broken by a hyphen.
- Returns:
- Number
The minimum number of characters at the end of a word that can be broken by a hyphen.
- Returns:
- Number
The maximum number of consecutive lines on which hyphenation may occur. A value of 0 means unlimited consecutive hyphens are allowed at ends of lines.
- Returns:
- Number
Specifies a distance from the right edge of the paragraph, where hyphenation is not allowed. A value of 0 allows all hyphenation.
- Returns:
- Number
Specifies whether capitalized words should be hyphenated.
- Returns:
- Boolean — true if capitalized words should be hyphenated, false otherwise
- Returns:
- Number
Word Spacing
The desired word spacing of the paragraph.
- Returns:
- Number
The maximum word spacing of the paragraph.
- Returns:
- Number
The minimum word spacing of the paragraph.
- Returns:
- Number
Letter Spacing
The desired letter spacing of the paragraph.
- Returns:
- Number
The maximum letter spacing of the paragraph.
- Returns:
- Number
The minimum letter spacing of the paragraph.
- Returns:
- Number
Glyph Scaling
The desired glyph scaling of the paragraph as a value between 0 and 1.
- Returns:
- Number
The maximum glyph scaling of the paragraph as a value between 0 and 1.
- Returns:
- Number
The minimum glyph scaling of the paragraph as a value between 0 and 1.
- Returns:
- Number
Leading
The auto leading percentage of the paragraph as a value between 0 and 1.
- Returns:
- Number
Tabs
The default tab width of the paragraph.
- Returns:
- Number