TextParagraph
TextParagraph class
Represents the text paragraph setting.
class TextParagraph extends FontSetting;
Constructors
| Constructor | Description |
|---|---|
| constructor(FontSetting) | Constructs from a parent object convertible to this. |
Properties
| Property | Type | Description |
|---|---|---|
| bullet | Bullet | Readonly. Gets the bullet. |
| lineSpaceSizeType | LineSpaceSizeType | Gets and sets the amount of vertical white space that will be used within a paragraph. |
| lineSpace | number | Gets and sets the amount of vertical white space that will be used within a paragraph. |
| spaceAfterSizeType | LineSpaceSizeType | Gets and sets the amount of vertical white space that will be present after a paragraph. |
| spaceAfter | number | Gets and sets the amount of vertical white space that will be present after a paragraph. |
| spaceBeforeSizeType | LineSpaceSizeType | Gets and sets the amount of vertical white space that will be present before a paragraph. |
| spaceBefore | number | Gets and sets the amount of vertical white space that will be present before a paragraph. |
| stops | TextTabStopCollection | Readonly. Gets tab stop list. |
| isLatinLineBreak | boolean | Specifies whether a Latin word can be broken in half and wrapped onto the next line without a hyphen being added. |
| isEastAsianLineBreak | boolean | Specifies whether an East Asian word can be broken in half and wrapped onto the next line without a hyphen being added. |
| isHangingPunctuation | boolean | Specifies whether punctuation is to be forcefully laid out on a line of text or put on a different line of text. |
| rightMargin | number | Specifies the right margin of the paragraph. |
| leftMargin | number | Specifies the left margin of the paragraph. |
| firstLineIndent | number | Specifies the indent size that will be applied to the first line of text in the paragraph. |
| fontAlignType | TextFontAlignType | 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. |
| alignmentType | TextAlignmentType | Gets and sets the text horizontal alignment type of the paragraph. |
| defaultTabSize | number | Gets and sets the default size for a tab character within this paragraph. |
| children | FontSetting[] | Readonly. Gets all text runs in this paragraph. If this paragraph is empty, return paragraph itself. |
| startIndex | number | Readonly. Gets the start index of the characters. |
| length | number | Readonly. Gets the length of the characters. |
| font | Font | Readonly. Returns the font of this object. |
| textOptions | TextOptions | Readonly. Returns the text options. |
Methods
| Method | Description |
|---|---|
| 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:
| Parameter | Type | Description |
|---|---|---|
| obj | FontSetting | The 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
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
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:
| Parameter | Type | Description |
|---|---|---|
| value | LineSpaceSizeType | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | number | The 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
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:
| Parameter | Type | Description |
|---|---|---|
| value | LineSpaceSizeType | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | number | The 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
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:
| Parameter | Type | Description |
|---|---|---|
| value | LineSpaceSizeType | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | number | The value to set. |
getStops()
@deprecated. Please use the ‘stops’ property instead. Gets tab stop list.
getStops() : TextTabStopCollection;
Returns
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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | number | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | number | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | number | The 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
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:
| Parameter | Type | Description |
|---|---|---|
| value | TextFontAlignType | The 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
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:
| Parameter | Type | Description |
|---|---|---|
| value | TextAlignmentType | The 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:
| Parameter | Type | Description |
|---|---|---|
| value | number | The 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
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
getTextOptions()
@deprecated. Please use the ’textOptions’ property instead. Returns the text options.
getTextOptions() : TextOptions;
Returns
setWordArtStyle(PresetWordArtStyle)
Sets the preset WordArt style.
setWordArtStyle(style: PresetWordArtStyle) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| style | PresetWordArtStyle | The preset WordArt style. |
Remarks
Only for the text of shape/chart.
getType()
Gets the type of text node.
getType() : TextNodeType;
Returns