Class: ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:997
Paragraph style builder
Extends
Constructors
new ParagraphStyleBuilder()
new ParagraphStyleBuilder(style): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1012
Parameters
Parameter | Type |
---|---|
style | IParagraphStyle |
Returns
Overrides
ParagraphStyleValue
.constructor
Properties
Property | Modifier | Type | Inherited from | Defined in |
---|---|---|---|---|
_style | protected | IParagraphStyle | ParagraphStyleValue ._style | 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
Inherited from
ParagraphStyleValue
.borderBetween
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
Inherited from
ParagraphStyleValue
.borderBottom
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
Inherited from
ParagraphStyleValue
.borderLeft
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
Inherited from
ParagraphStyleValue
.borderRight
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
Inherited from
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
Inherited from
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
Inherited from
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
Inherited from
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
Inherited from
ParagraphStyleValue
.horizontalAlign
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
Inherited from
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
Inherited from
ParagraphStyleValue
.indentFirstLine
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
Inherited from
ParagraphStyleValue
.indentStart
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
Inherited from
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
Inherited from
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
Inherited from
ParagraphStyleValue
.lineSpacing
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
Inherited from
ParagraphStyleValue
.namedStyleType
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
Inherited from
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
Inherited from
ParagraphStyleValue
.snapToGrid
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
Inherited from
ParagraphStyleValue
.spaceAbove
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
Inherited from
ParagraphStyleValue
.spaceBelow
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
Inherited from
ParagraphStyleValue
.spacingRule
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
Inherited from
ParagraphStyleValue
.suppressHyphenation
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
Inherited from
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
Inherited from
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
Inherited from
ParagraphStyleValue
.widowControl
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
Inherited from
Methods
build()
build(): IParagraphStyle
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1454
Builds and returns the final paragraph style configuration
Returns
The constructed paragraph style object
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const finalStyle = style.build();
copy()
copy(): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1441
Creates a copy of the current paragraph style builder
Returns
A new instance of ParagraphStyleBuilder with the same settings
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
Overrides
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());
Inherited from
setBorderBetween()
setBorderBetween(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1267
Sets the border between
Parameters
Parameter | Type | Description |
---|---|---|
value | IParagraphBorder | The border between |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setBorderBetween({ color: 'red', width: 1 });
setBorderBottom()
setBorderBottom(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1299
Sets the border bottom
Parameters
Parameter | Type | Description |
---|---|---|
value | IParagraphBorder | The border bottom |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setBorderBottom({ color: 'red', width: 1 });
setBorderLeft()
setBorderLeft(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1315
Sets the border left
Parameters
Parameter | Type | Description |
---|---|---|
value | IParagraphBorder | The border left |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setBorderLeft({ color: 'red', width: 1 });
setBorderRight()
setBorderRight(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1331
Sets the border right
Parameters
Parameter | Type | Description |
---|---|---|
value | IParagraphBorder | The border right |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setBorderRight({ color: 'red', width: 1 });
setBorderTop()
setBorderTop(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1283
Sets the border top
Parameters
Parameter | Type | Description |
---|---|---|
value | IParagraphBorder | The border top |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setBorderTop({ color: 'red', width: 1 });
setDirection()
setDirection(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1187
Sets the text direction
Parameters
Parameter | Type | Description |
---|---|---|
value | TextDirection | The text direction |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setTextDirection(TextDirection.RIGHT_TO_LEFT);
setHanging()
setHanging(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1043
Sets the hanging
Parameters
Parameter | Type | Description |
---|---|---|
value | INumberUnit | The hanging |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setHanging(10);
setHeadingId()
setHeadingId(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1123
Sets the heading id
Parameters
Parameter | Type | Description |
---|---|---|
value | string | The heading id |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setHeadingId('test');
setHorizontalAlign()
setHorizontalAlign(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1155
Sets the vertical align
Parameters
Parameter | Type | Description |
---|---|---|
value | HorizontalAlign | The vertical align |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setVerticalAlign(VerticalAlign.CENTER);
setIndentEnd()
setIndentEnd(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1091
Sets the indent end
Parameters
Parameter | Type | Description |
---|---|---|
value | INumberUnit | The indent end |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setIndentEnd(10);
setIndentFirstLine()
setIndentFirstLine(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1027
Sets the indent first line
Parameters
Parameter | Type | Description |
---|---|---|
value | INumberUnit | The indent first line |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setIndentFirstLine(10);
setIndentStart()
setIndentStart(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1059
Sets the indent start
Parameters
Parameter | Type | Description |
---|---|---|
value | INumberUnit | The indent start |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setIndentStart(10);
setKeepLines()
setKeepLines(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1347
Sets the keep lines
Parameters
Parameter | Type | Description |
---|---|---|
value | boolean | The keep lines |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setKeepLines(true);
setKeepNext()
setKeepNext(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1363
Sets the keep next
Parameters
Parameter | Type | Description |
---|---|---|
value | boolean | The keep next |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setKeepNext(true);
setLineSpacing()
setLineSpacing(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1171
Sets the line spacing
Parameters
Parameter | Type | Description |
---|---|---|
value | number | The line spacing |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setLineSpacing(10);
setNamedStyleType()
setNamedStyleType(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1139
Sets the named style type
Parameters
Parameter | Type | Description |
---|---|---|
value | NamedStyleType | The named style type |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setNamedStyleType(NamedStyleType.CHAPTER);
setShading()
setShading(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1411
Sets the shading style
Parameters
Parameter | Type | Description |
---|---|---|
value | IShading | The shading configuration |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setShading({ backgroundColor: '#f0f0f0' });
setSnapToGrid()
setSnapToGrid(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1219
Sets the snap to grid
Parameters
Parameter | Type | Description |
---|---|---|
value | boolean | The snap to grid |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setSnapToGrid(true);
setSpaceAbove()
setSpaceAbove(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1235
Sets the space above
Parameters
Parameter | Type | Description |
---|---|---|
value | INumberUnit | The space above |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setSpaceAbove(10);
setSpaceBelow()
setSpaceBelow(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1251
Sets the space below
Parameters
Parameter | Type | Description |
---|---|---|
value | INumberUnit | The space below |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setSpaceBelow(10);
setSpacingRule()
setSpacingRule(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1203
Sets the spacing rule
Parameters
Parameter | Type | Description |
---|---|---|
value | SpacingRule | The spacing rule |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setSpacingRule(SpacingRule.AUTO);
setSuppressHyphenation()
setSuppressHyphenation(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1427
Sets whether to suppress hyphenation
Parameters
Parameter | Type | Description |
---|---|---|
value | boolean | The suppress hyphenation value |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setSuppressHyphenation(true);
setTabStops()
setTabStops(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1075
Sets the tab stops
Parameters
Parameter | Type | Description |
---|---|---|
value | ITabStop [] | The tab stops |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setTabStops([{ value: 10 }]);
setTextStyle()
setTextStyle(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1107
Sets the text style
Parameters
Parameter | Type | Description |
---|---|---|
value | ITextStyle | The text style |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setTextStyle({ ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE });
setWidowControl()
setWidowControl(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1395
Sets the widow control
Parameters
Parameter | Type | Description |
---|---|---|
value | boolean | The widow control value |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setWidowControl(true);
setWordWrap()
setWordWrap(value): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1379
Sets the word wrap
Parameters
Parameter | Type | Description |
---|---|---|
value | boolean | The word wrap |
Returns
The paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();
copy.setWordWrap(true);
create()
static create(style): ParagraphStyleBuilder
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1008
Creates a new paragraph style builder
Parameters
Parameter | Type | Description |
---|---|---|
style | IParagraphStyle | The paragraph style |
Returns
A new paragraph style builder
Example
const style = ParagraphStyleValue.create({ textStyle: { ff: 'Arial', fs: 12, it: univerAPI.Enum.BooleanNumber.TRUE, bl: univerAPI.Enum.BooleanNumber.TRUE } });
const copy = style.copy();