@univerjscoreclassesParagraphstylebuilder

@univerjs/core v0.5.4


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

ParameterType
styleIParagraphStyle

Returns

ParagraphStyleBuilder

Overrides

ParagraphStyleValue.constructor

Properties

PropertyModifierTypeInherited fromDefined in
_styleprotectedIParagraphStyleParagraphStyleValue._stylepackages/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

Nullable<IParagraphBorder>

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

Nullable<IParagraphBorder>

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

Nullable<IParagraphBorder>

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

Nullable<IParagraphBorder>

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

Nullable<IParagraphBorder>

The border top

Inherited from

ParagraphStyleValue.borderTop


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

Nullable<TextDirection>

The text direction

Inherited from

ParagraphStyleValue.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

Nullable<INumberUnit>

The hanging indent

Inherited from

ParagraphStyleValue.hanging


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

ParagraphStyleValue.headingId


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

Nullable<HorizontalAlign>

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

Nullable<INumberUnit>

The indent end

Inherited from

ParagraphStyleValue.indentEnd


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

Nullable<INumberUnit>

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

Nullable<INumberUnit>

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

ParagraphStyleValue.keepLines


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

ParagraphStyleValue.keepNext


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

Nullable<NamedStyleType>

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

Nullable<IShading>

The shading

Inherited from

ParagraphStyleValue.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

Nullable<BooleanNumber>

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

Nullable<INumberUnit>

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

Nullable<INumberUnit>

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

Nullable<SpacingRule>

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

Nullable<ITabStop[]>

The indent end

Inherited from

ParagraphStyleValue.tabStops


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

Nullable<ITextStyle>

The text style

Inherited from

ParagraphStyleValue.textStyle


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

ParagraphStyleValue.wordWrap

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

IParagraphStyle

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

ParagraphStyleBuilder

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

ParagraphStyleValue.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

IParagraphStyle

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

ParagraphStyleValue.getValue


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

ParameterTypeDescription
valueIParagraphBorderThe border between

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueIParagraphBorderThe border bottom

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueIParagraphBorderThe border left

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueIParagraphBorderThe border right

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueIParagraphBorderThe border top

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueTextDirectionThe text direction

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueINumberUnitThe hanging

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuestringThe heading id

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueHorizontalAlignThe vertical align

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueINumberUnitThe indent end

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueINumberUnitThe indent first line

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueINumberUnitThe indent start

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuebooleanThe keep lines

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuebooleanThe keep next

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuenumberThe line spacing

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueNamedStyleTypeThe named style type

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueIShadingThe shading configuration

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuebooleanThe snap to grid

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueINumberUnitThe space above

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueINumberUnitThe space below

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueSpacingRuleThe spacing rule

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuebooleanThe suppress hyphenation value

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueITabStop[]The tab stops

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valueITextStyleThe text style

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuebooleanThe widow control value

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
valuebooleanThe word wrap

Returns

ParagraphStyleBuilder

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

ParameterTypeDescription
styleIParagraphStyleThe paragraph style

Returns

ParagraphStyleBuilder

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();

Overrides

ParagraphStyleValue.create