@univerjscoreclassesRichtextvalue

@univerjs/core v0.5.4


Class: RichTextValue

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1462

Represents a rich text value

Extended by

Constructors

new RichTextValue()

new RichTextValue(data): RichTextValue

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1483

Parameters

ParameterType
dataIDocumentData

Returns

RichTextValue

Properties

PropertyModifierTypeDefined in
_dataprotectedIDocumentDatapackages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1463

Methods

copy()

copy(): RichTextBuilder

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1494

Creates a copy of the current RichTextValue instance

Returns

RichTextBuilder

A new instance of RichTextValue with the same data


getData()

getData(): IDocumentData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1574

Gets the data of the current RichTextValue instance

Returns

IDocumentData

The data of the current RichTextValue instance


getLinks(): ICustomRange[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1566

Gets the links of the current RichTextValue instance

Returns

ICustomRange[]

The links of the current RichTextValue instance


getParagraphBullet()

getParagraphBullet(): undefined | IBullet

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1532

Gets the paragraph bullet of the current RichTextValue instance

Returns

undefined | IBullet

The paragraph bullet of the current RichTextValue instance


getParagraphs()

getParagraphs(): RichTextValue[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1540

Gets the paragraphs of the current RichTextValue instance

Returns

RichTextValue[]

The paragraphs of the current RichTextValue instance


getParagraphStyle()

getParagraphStyle(): ParagraphStyleValue

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1524

Gets the paragraph style of the current RichTextValue instance

Returns

ParagraphStyleValue

The paragraph style of the current RichTextValue instance


getTextRuns()

getTextRuns(): {
  ed: number;
  sId: string;
  st: number;
  ts: null | TextStyleValue;
 }[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1555

Gets the text runs of the current RichTextValue instance

Returns

{ ed: number; sId: string; st: number; ts: null | TextStyleValue; }[]

The text runs of the current RichTextValue instance


slice()

slice(start, end): RichTextBuilder

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1504

Slices the current RichTextValue instance

Parameters

ParameterTypeDescription
startnumberThe start index
endnumberThe end index

Returns

RichTextBuilder

A new instance of RichTextBuilder with the sliced data


toPlainText()

toPlainText(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1516

Converts the current RichTextValue instance to plain text

Returns

string

The plain text representation of the current RichTextValue instance


create()

static create(data): RichTextValue

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1470

Creates a new RichTextValue instance

Parameters

ParameterTypeDescription
dataIDocumentDataThe initial data for the rich text value

Returns

RichTextValue

A new RichTextValue instance


createByBody()

static createByBody(data): RichTextValue

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/docs/data-model/rich-text-builder.ts:1479

Creates a new RichTextValue instance

Parameters

ParameterTypeDescription
dataIDocumentBodyThe initial data for the rich text value

Returns

RichTextValue

A new RichTextValue instance