Skip to content

stylesFromArray

stylesFromArray(styles, text): TextStyle

Defined in: src/util/misc/textStyles.ts:99

Returns the object form of the styles property with styles that are assigned per character rather than grouped by range. This format is more verbose, and is only used during runtime (not for serialization/storage)

the serialized form of a text object’s styles

TextStyle | TextStyleArray

string

the text string that the styles are applied to

TextStyle