ITextRun
A text formatting run within an IDocumentBody. It associates a text interval1 with an ITextStyle.
Import
TypeScript
import type { ITextRun } from '@univerjs/core'Definition
TypeScript
interface ITextRun { st: number ed: number sId?: string ts?: ITextStyle}Fields
st
Required · number
Inclusive character index of the first styled character.
ed
Required · number
Exclusive character boundary after the last styled character.
sId
Optional · string | undefined
ts
Optional · ITextStyle | undefined
Related types
Package: @univerjs/core · Type definitions
Footnotes
-
Text offsets use JavaScript UTF-16 code units, not visible character counts. For example,
"😀".lengthis 2. A text run covers[st, ed):stis included andedis excluded; do not reuse the inclusive end indices of sheet ranges. ↩
How is this guide?