Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RichTextFormatEvent<F, K>

Event emitted by CRichText when a range of characters is formatted.

A range can be formatted either by CRichText.format, or by CRichText.insert if its given format does not match the new characters' inherited format.

Type Parameters

  • F extends Record<string, any> = Record<string, any>

  • K extends keyof F & string = keyof F & string

Hierarchy

Index

Properties

endIndex: number

The range's ending index, exclusive.

The affected characters are text.slice(startIndex, endIndex).

format: Partial<F>

The range's complete new format.

key: K

The format key that changed.

Metadata for the update that caused this event.

previousValue: undefined | F[K]

The previous format value at key, or undefined if the key was previously not present.

startIndex: number

The range's starting index, inclusive.

The affected characters are text.slice(startIndex, endIndex).

value: undefined | F[K]

The new format value at key, or undefined if the key's format was deleted.

Generated using TypeDoc