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
Parameter | Type |
---|---|
data | IDocumentData |
Returns
Properties
Property | Modifier | Type | Defined in |
---|---|---|---|
_data | protected | IDocumentData | packages/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
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
The data of the current RichTextValue instance
getLinks()
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
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
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
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
Parameter | Type | Description |
---|---|---|
start | number | The start index |
end | number | The end index |
Returns
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
Parameter | Type | Description |
---|---|---|
data | IDocumentData | The initial data for the rich text value |
Returns
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
Parameter | Type | Description |
---|---|---|
data | IDocumentBody | The initial data for the rich text value |
Returns
A new RichTextValue instance