Skip to content

HTMLTextStyleManager

Class for managing HTML text styles.

Constructors

new HTMLTextStyleManager()

new HTMLTextStyleManager(): HTMLTextStyleManager

Returns

HTMLTextStyleManager

Methods

add()

static add(id, pTextStyle): void

Adds a new style.

Parameters

id: string | number

The ID of the style.

pTextStyle: HTMLTextStyle

The text style to add.

Returns

void

Source

src/utils/HTMLTextStyleManager.ts:31


get()

static get(id): HTMLTextStyle

Gets a style by ID.

Parameters

id: string | number

The ID of the style.

Returns

HTMLTextStyle

  • The text style.

Source

src/utils/HTMLTextStyleManager.ts:43


load()

static load(family, style, variants): Promise<HTMLTextStyle>

Loads a style.

Parameters

family: string

The font family.

style: Partial<HTMLTextStyle>

The style to load.

variants: HTMLTextVariant

The variants of the style.

Returns

Promise<HTMLTextStyle>

  • The loaded text style.

Source

src/utils/HTMLTextStyleManager.ts:61