TextParagraph

TextParagraph class

Represents the text paragraph setting.

class TextParagraph extends FontSetting;

Constructors

ConstructorDescription
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
getBullet()@deprecated. Please use the ‘bullet’ property instead. Gets the bullet.
getLineSpaceSizeType()@deprecated. Please use the ’lineSpaceSizeType’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.
setLineSpaceSizeType(LineSpaceSizeType)@deprecated. Please use the ’lineSpaceSizeType’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.
getLineSpace()@deprecated. Please use the ’lineSpace’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.
setLineSpace(number)@deprecated. Please use the ’lineSpace’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.
getSpaceAfterSizeType()@deprecated. Please use the ‘spaceAfterSizeType’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.
setSpaceAfterSizeType(LineSpaceSizeType)@deprecated. Please use the ‘spaceAfterSizeType’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.
getSpaceAfter()@deprecated. Please use the ‘spaceAfter’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.
setSpaceAfter(number)@deprecated. Please use the ‘spaceAfter’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.
getSpaceBeforeSizeType()@deprecated. Please use the ‘spaceBeforeSizeType’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.
setSpaceBeforeSizeType(LineSpaceSizeType)@deprecated. Please use the ‘spaceBeforeSizeType’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.
getSpaceBefore()@deprecated. Please use the ‘spaceBefore’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.
setSpaceBefore(number)@deprecated. Please use the ‘spaceBefore’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.
getStops()@deprecated. Please use the ‘stops’ property instead. Gets tab stop list.
isLatinLineBreak()@deprecated. Please use the ‘isLatinLineBreak’ property instead. Specifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added.
setIsLatinLineBreak(boolean)@deprecated. Please use the ‘isLatinLineBreak’ property instead. Specifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added.
isEastAsianLineBreak()@deprecated. Please use the ‘isEastAsianLineBreak’ property instead. Specifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added.
setIsEastAsianLineBreak(boolean)@deprecated. Please use the ‘isEastAsianLineBreak’ property instead. Specifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added.
isHangingPunctuation()@deprecated. Please use the ‘isHangingPunctuation’ property instead. Specifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text.
setIsHangingPunctuation(boolean)@deprecated. Please use the ‘isHangingPunctuation’ property instead. Specifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text.
getRightMargin()@deprecated. Please use the ‘rightMargin’ property instead. Specifies the right margin of the paragraph.
setRightMargin(number)@deprecated. Please use the ‘rightMargin’ property instead. Specifies the right margin of the paragraph.
getLeftMargin()@deprecated. Please use the ’leftMargin’ property instead. Specifies the left margin of the paragraph.
setLeftMargin(number)@deprecated. Please use the ’leftMargin’ property instead. Specifies the left margin of the paragraph.
getFirstLineIndent()@deprecated. Please use the ‘firstLineIndent’ property instead. Specifies the indent size that will be applied to the first line of text in the paragraph.
setFirstLineIndent(number)@deprecated. Please use the ‘firstLineIndent’ property instead. Specifies the indent size that will be applied to the first line of text in the paragraph.
getFontAlignType()@deprecated. Please use the ‘fontAlignType’ property instead. 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.
setFontAlignType(TextFontAlignType)@deprecated. Please use the ‘fontAlignType’ property instead. 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.
getAlignmentType()@deprecated. Please use the ‘alignmentType’ property instead. Gets and sets the text horizontal alignment type of the paragraph.
setAlignmentType(TextAlignmentType)@deprecated. Please use the ‘alignmentType’ property instead. Gets and sets the text horizontal alignment type of the paragraph.
getDefaultTabSize()@deprecated. Please use the ‘defaultTabSize’ property instead. Gets and sets the default size for a tab character within this paragraph.
setDefaultTabSize(number)@deprecated. Please use the ‘defaultTabSize’ property instead. Gets and sets the default size for a tab character within this paragraph.
getChildren()@deprecated. Please use the ‘children’ property instead. Gets all text runs in this paragraph. If this paragraph is empty, return paragraph itself.
isNull()Checks whether the implementation object is null.
getStartIndex()@deprecated. Please use the ‘startIndex’ property instead. Gets the start index of the characters.
getLength()@deprecated. Please use the ’length’ property instead. Gets the length of the characters.
getFont()@deprecated. Please use the ‘font’ property instead. Returns the font of this object.
getTextOptions()@deprecated. Please use the ’textOptions’ property instead. Returns the text options.
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;

getBullet()

@deprecated. Please use the ‘bullet’ property instead. Gets the bullet.

getBullet() : Bullet;

Returns

Bullet

getLineSpaceSizeType()

@deprecated. Please use the ’lineSpaceSizeType’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.

getLineSpaceSizeType() : LineSpaceSizeType;

Returns

LineSpaceSizeType

setLineSpaceSizeType(LineSpaceSizeType)

@deprecated. Please use the ’lineSpaceSizeType’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.

setLineSpaceSizeType(value: LineSpaceSizeType) : void;

Parameters:

ParameterTypeDescription
valueLineSpaceSizeTypeThe value to set.

getLineSpace()

@deprecated. Please use the ’lineSpace’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.

getLineSpace() : number;

setLineSpace(number)

@deprecated. Please use the ’lineSpace’ property instead. Gets and sets the amount of vertical white space that will be used within a paragraph.

setLineSpace(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getSpaceAfterSizeType()

@deprecated. Please use the ‘spaceAfterSizeType’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.

getSpaceAfterSizeType() : LineSpaceSizeType;

Returns

LineSpaceSizeType

setSpaceAfterSizeType(LineSpaceSizeType)

@deprecated. Please use the ‘spaceAfterSizeType’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.

setSpaceAfterSizeType(value: LineSpaceSizeType) : void;

Parameters:

ParameterTypeDescription
valueLineSpaceSizeTypeThe value to set.

getSpaceAfter()

@deprecated. Please use the ‘spaceAfter’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.

getSpaceAfter() : number;

setSpaceAfter(number)

@deprecated. Please use the ‘spaceAfter’ property instead. Gets and sets the amount of vertical white space that will be present after a paragraph.

setSpaceAfter(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getSpaceBeforeSizeType()

@deprecated. Please use the ‘spaceBeforeSizeType’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.

getSpaceBeforeSizeType() : LineSpaceSizeType;

Returns

LineSpaceSizeType

setSpaceBeforeSizeType(LineSpaceSizeType)

@deprecated. Please use the ‘spaceBeforeSizeType’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.

setSpaceBeforeSizeType(value: LineSpaceSizeType) : void;

Parameters:

ParameterTypeDescription
valueLineSpaceSizeTypeThe value to set.

getSpaceBefore()

@deprecated. Please use the ‘spaceBefore’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.

getSpaceBefore() : number;

setSpaceBefore(number)

@deprecated. Please use the ‘spaceBefore’ property instead. Gets and sets the amount of vertical white space that will be present before a paragraph.

setSpaceBefore(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getStops()

@deprecated. Please use the ‘stops’ property instead. Gets tab stop list.

getStops() : TextTabStopCollection;

Returns

TextTabStopCollection

isLatinLineBreak()

@deprecated. Please use the ‘isLatinLineBreak’ property instead. Specifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added.

isLatinLineBreak() : boolean;

setIsLatinLineBreak(boolean)

@deprecated. Please use the ‘isLatinLineBreak’ property instead. Specifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added.

setIsLatinLineBreak(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isEastAsianLineBreak()

@deprecated. Please use the ‘isEastAsianLineBreak’ property instead. Specifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added.

isEastAsianLineBreak() : boolean;

setIsEastAsianLineBreak(boolean)

@deprecated. Please use the ‘isEastAsianLineBreak’ property instead. Specifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added.

setIsEastAsianLineBreak(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isHangingPunctuation()

@deprecated. Please use the ‘isHangingPunctuation’ property instead. Specifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text.

isHangingPunctuation() : boolean;

setIsHangingPunctuation(boolean)

@deprecated. Please use the ‘isHangingPunctuation’ property instead. Specifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text.

setIsHangingPunctuation(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getRightMargin()

@deprecated. Please use the ‘rightMargin’ property instead. Specifies the right margin of the paragraph.

getRightMargin() : number;

setRightMargin(number)

@deprecated. Please use the ‘rightMargin’ property instead. Specifies the right margin of the paragraph.

setRightMargin(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeftMargin()

@deprecated. Please use the ’leftMargin’ property instead. Specifies the left margin of the paragraph.

getLeftMargin() : number;

setLeftMargin(number)

@deprecated. Please use the ’leftMargin’ property instead. Specifies the left margin of the paragraph.

setLeftMargin(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getFirstLineIndent()

@deprecated. Please use the ‘firstLineIndent’ property instead. Specifies the indent size that will be applied to the first line of text in the paragraph.

getFirstLineIndent() : number;

setFirstLineIndent(number)

@deprecated. Please use the ‘firstLineIndent’ property instead. Specifies the indent size that will be applied to the first line of text in the paragraph.

setFirstLineIndent(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getFontAlignType()

@deprecated. Please use the ‘fontAlignType’ property instead. 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.

getFontAlignType() : TextFontAlignType;

Returns

TextFontAlignType

setFontAlignType(TextFontAlignType)

@deprecated. Please use the ‘fontAlignType’ property instead. 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.

setFontAlignType(value: TextFontAlignType) : void;

Parameters:

ParameterTypeDescription
valueTextFontAlignTypeThe value to set.

getAlignmentType()

@deprecated. Please use the ‘alignmentType’ property instead. Gets and sets the text horizontal alignment type of the paragraph.

getAlignmentType() : TextAlignmentType;

Returns

TextAlignmentType

setAlignmentType(TextAlignmentType)

@deprecated. Please use the ‘alignmentType’ property instead. Gets and sets the text horizontal alignment type of the paragraph.

setAlignmentType(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

getDefaultTabSize()

@deprecated. Please use the ‘defaultTabSize’ property instead. Gets and sets the default size for a tab character within this paragraph.

getDefaultTabSize() : number;

setDefaultTabSize(number)

@deprecated. Please use the ‘defaultTabSize’ property instead. Gets and sets the default size for a tab character within this paragraph.

setDefaultTabSize(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getChildren()

@deprecated. Please use the ‘children’ property instead. Gets all text runs in this paragraph. If this paragraph is empty, return paragraph itself.

getChildren() : FontSetting[];

Returns

FontSetting[]

isNull()

Checks whether the implementation object is null.

isNull() : boolean;

getStartIndex()

@deprecated. Please use the ‘startIndex’ property instead. Gets the start index of the characters.

getStartIndex() : number;

getLength()

@deprecated. Please use the ’length’ property instead. Gets the length of the characters.

getLength() : number;

getFont()

@deprecated. Please use the ‘font’ property instead. Returns the font of this object.

getFont() : Font;

Returns

Font

getTextOptions()

@deprecated. Please use the ’textOptions’ property instead. Returns the text options.

getTextOptions() : TextOptions;

Returns

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