TextParagraph

TextParagraph class

Represents the text paragraph setting.

class TextParagraph extends FontSetting;

Constructors

NameDescription
constructor(FontSetting)Constructs from a parent object convertible to this.

Properties

PropertyTypeDescription
bulletBulletReadonly. Gets the bullet.
lineSpaceSizeTypeLineSpaceSizeTypeGets and sets the amount of vertical white space that will be used within a paragraph.
lineSpacenumberGets and sets the amount of vertical white space that will be used within a paragraph.
spaceAfterSizeTypeLineSpaceSizeTypeGets and sets the amount of vertical white space that will be present after a paragraph.
spaceAfternumberGets and sets the amount of vertical white space that will be present after a paragraph.
spaceBeforeSizeTypeLineSpaceSizeTypeGets and sets the amount of vertical white space that will be present before a paragraph.
spaceBeforenumberGets and sets the amount of vertical white space that will be present before a paragraph.
stopsTextTabStopCollectionReadonly. Gets tab stop list.
isLatinLineBreakbooleanSpecifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added.
isEastAsianLineBreakbooleanSpecifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added.
isHangingPunctuationbooleanSpecifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text.
rightMarginnumberSpecifies the right margin of the paragraph.
leftMarginnumberSpecifies the left margin of the paragraph.
firstLineIndentnumberSpecifies the indent size that will be applied to the first line of text in the paragraph.
fontAlignTypeTextFontAlignTypeDetermines where vertically on a line of text the actual words are positioned. This deals with vertical placement of the characters with respect to the baselines.
alignmentTypeTextAlignmentTypeGets and sets the text horizontal alignment type of the paragraph.
defaultTabSizenumberGets and sets the default size for a tab character within this paragraph.
childrenFontSetting[]Readonly. Gets all text runs in this paragraph. If this paragraph is empty, return paragraph itself.
startIndexnumberReadonly. Gets the start index of the characters.
lengthnumberReadonly. Gets the length of the characters.
fontFontReadonly. Returns the font of this object.
textOptionsTextOptionsReadonly. Returns the text options.

Methods

MethodDescription
setWordArtStyle(PresetWordArtStyle)Sets the preset WordArt style.
getType()Gets the type of text node.

constructor(FontSetting)

Constructs from a parent object convertible to this.

constructor(obj: FontSetting);

Parameters:

ParameterTypeDescription
objFontSettingThe parent object.

bullet

Readonly. Gets the bullet.

bullet : Bullet;

lineSpaceSizeType

Gets and sets the amount of vertical white space that will be used within a paragraph.

lineSpaceSizeType : LineSpaceSizeType;

lineSpace

Gets and sets the amount of vertical white space that will be used within a paragraph.

lineSpace : number;

spaceAfterSizeType

Gets and sets the amount of vertical white space that will be present after a paragraph.

spaceAfterSizeType : LineSpaceSizeType;

spaceAfter

Gets and sets the amount of vertical white space that will be present after a paragraph.

spaceAfter : number;

spaceBeforeSizeType

Gets and sets the amount of vertical white space that will be present before a paragraph.

spaceBeforeSizeType : LineSpaceSizeType;

spaceBefore

Gets and sets the amount of vertical white space that will be present before a paragraph.

spaceBefore : number;

stops

Readonly. Gets tab stop list.

stops : TextTabStopCollection;

isLatinLineBreak

Specifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added.

isLatinLineBreak : boolean;

isEastAsianLineBreak

Specifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added.

isEastAsianLineBreak : boolean;

isHangingPunctuation

Specifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text.

isHangingPunctuation : boolean;

rightMargin

Specifies the right margin of the paragraph.

rightMargin : number;

leftMargin

Specifies the left margin of the paragraph.

leftMargin : number;

firstLineIndent

Specifies the indent size that will be applied to the first line of text in the paragraph.

firstLineIndent : number;

fontAlignType

Determines where vertically on a line of text the actual words are positioned. This deals with vertical placement of the characters with respect to the baselines.

fontAlignType : TextFontAlignType;

alignmentType

Gets and sets the text horizontal alignment type of the paragraph.

alignmentType : TextAlignmentType;

defaultTabSize

Gets and sets the default size for a tab character within this paragraph.

defaultTabSize : number;

children

Readonly. Gets all text runs in this paragraph. If this paragraph is empty, return paragraph itself.

children : FontSetting[];

startIndex

Readonly. Gets the start index of the characters.

startIndex : number;

length

Readonly. Gets the length of the characters.

length : number;

font

Readonly. Returns the font of this object.

font : Font;

textOptions

Readonly. Returns the text options.

textOptions : TextOptions;

setWordArtStyle(PresetWordArtStyle)

Sets the preset WordArt style.

setWordArtStyle(style: PresetWordArtStyle) : void;

Parameters:

ParameterTypeDescription
stylePresetWordArtStyleThe preset WordArt style.

Remarks

Only for the text of shape/chart.

getType()

Gets the type of text node.

getType() : TextNodeType;

Returns

TextNodeType