Class: ParagraphStyleValue
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:609
Extended by
Constructors
new ParagraphStyleValue()
new ParagraphStyleValue(style): ParagraphStyleValue
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:625
Parameters
Parameter | Type |
---|---|
style | IParagraphStyle |
Returns
Properties
Property | Modifier | Type | Defined in |
---|---|---|---|
_style | protected | IParagraphStyle | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:610 |
Accessors
borderBetween
Get Signature
get borderBetween(): Nullable<IParagraphBorder>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:833
Gets the border between
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.borderBetween);
Returns
The border between
borderBottom
Get Signature
get borderBottom(): Nullable<IParagraphBorder>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:859
Gets the border bottom
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.borderBottom);
Returns
The border bottom
borderLeft
Get Signature
get borderLeft(): Nullable<IParagraphBorder>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:872
Gets the border left
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.borderLeft);
Returns
The border left
borderRight
Get Signature
get borderRight(): Nullable<IParagraphBorder>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:885
Gets the border right
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.borderRight);
Returns
The border right
borderTop
Get Signature
get borderTop(): Nullable<IParagraphBorder>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:846
Gets the border top
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.borderTop);
Returns
The border top
direction
Get Signature
get direction(): Nullable<TextDirection>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:768
Gets the text direction
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.direction);
Returns
The text direction
hanging
Get Signature
get hanging(): Nullable<INumberUnit>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:651
Gets the hanging indent
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.hanging);
Returns
The hanging indent
headingId
Get Signature
get headingId(): Nullable<string>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:716
Gets the heading id
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.headingId);
Returns
Nullable
<string
>
The heading id
horizontalAlign
Get Signature
get horizontalAlign(): Nullable<HorizontalAlign>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:742
Gets the horizontal align
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.horizontalAlign);
Returns
The horizontal align
indentEnd
Get Signature
get indentEnd(): Nullable<INumberUnit>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:690
Gets the indent end
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.indentEnd);
Returns
The indent end
indentFirstLine
Get Signature
get indentFirstLine(): Nullable<INumberUnit>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:638
Gets the first line indent
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.indentFirstLine);
Returns
The first line indent
indentStart
Get Signature
get indentStart(): Nullable<INumberUnit>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:664
Gets the indent start
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.indentStart);
Returns
The indent start
keepLines
Get Signature
get keepLines(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:898
Gets the keep lines
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.keepLines);
Returns
boolean
The keep lines
keepNext
Get Signature
get keepNext(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:911
Gets the keep next
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.keepNext);
Returns
boolean
The keep next
lineSpacing
Get Signature
get lineSpacing(): Nullable<number>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:755
Gets the line spacing
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.lineSpacing);
Returns
Nullable
<number
>
The line spacing
namedStyleType
Get Signature
get namedStyleType(): Nullable<NamedStyleType>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:729
Gets the named style type
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.namedStyleType);
Returns
The named style type
shading
Get Signature
get shading(): Nullable<IShading>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:950
Gets the shading
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.shading);
Returns
The shading
snapToGrid
Get Signature
get snapToGrid(): Nullable<BooleanNumber>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:794
Gets the snap to grid
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.snapToGrid);
Returns
The snap to grid
spaceAbove
Get Signature
get spaceAbove(): Nullable<INumberUnit>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:807
Gets the space above
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.spaceAbove);
Returns
The space above
spaceBelow
Get Signature
get spaceBelow(): Nullable<INumberUnit>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:820
Gets the space below
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.spaceBelow);
Returns
The space below
spacingRule
Get Signature
get spacingRule(): Nullable<SpacingRule>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:781
Gets the spacing rule
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.spacingRule);
Returns
The spacing rule
suppressHyphenation
Get Signature
get suppressHyphenation(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:963
Gets the suppress hyphenation
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.suppressHyphenation);
Returns
boolean
The suppress hyphenation
tabStops
Get Signature
get tabStops(): Nullable<ITabStop[]>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:677
Gets the indent end
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.indentEnd);
Returns
The indent end
textStyle
Get Signature
get textStyle(): Nullable<ITextStyle>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:703
Gets the text style
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.textStyle);
Returns
The text style
widowControl
Get Signature
get widowControl(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:937
Gets the widow control
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.widowControl);
Returns
boolean
The widow control
wordWrap
Get Signature
get wordWrap(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:924
Gets the word wrap
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.wordWrap);
Returns
boolean
The word wrap
Methods
copy()
copy(): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:976
Creates a copy of the paragraph style
Returns
The copy
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
getValue()
getValue(): IParagraphStyle
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:989
Gets the value
Returns
The value
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
console.log(style.getValue());
create()
static create(style): ParagraphStyleValue
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:621
Creates a new ParagraphStyleValue instance
Parameters
Parameter | Type | Description |
---|---|---|
style | IParagraphStyle | The initial style object |
Returns
A new ParagraphStyleValue instance
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });