SheetXL - v0.8.0-beta.25
    Preparing search index...

    Class RichText

    Text with formatted runs, as a cell value.

    The value of a cell whose text has more than one font: **Bold** plain. It is text to calculation (LEN, &, comparison, ISTEXT, TYPE() 2) and formatting to the renderer, and a reference carries it whole. A run's font records only what it sets over the cell's font; the first run usually sets nothing.

    Immutable. Make one with RichText.from or ICellRange.setRichText; read one with ICell.getRichText or getValue().

    Implements

    • IRichData
    Index
    • Parameters

      • runs: readonly RunUpdate[]

        The runs, in order. Copied and frozen; a run that sets no font is kept without one.

      Returns RichText

    Type: "richText" = 'richText'

    The name of the kind of every RichText (RichTextKind).

    • get isIRichData(): true

      {@inheritDoc IRichData.isIRichData}

      Returns true

    • {@inheritDoc IRichData.getKind}

      Returns IRichType

    • {@inheritDoc IRichData.getProperty}

      Parameters

      • _name: string

      Returns Scalar

    • The runs, in order; each font is what the run sets over the cell's font.

      Returns readonly Readonly<Run>[]

    • The text of every run, concatenated: what calculation reads.

      Returns string

    • Whether any run sets a font. A RichText with none is plain text that happens to be held as runs.

      Returns boolean

    • {@inheritDoc IRichData.toJSON}

      Returns JSON

    • {@inheritDoc IRichData.toPrimitive}

      Returns string

    • {@inheritDoc IRichData.toString}

      Returns string