Context passed to custom toolbar color picker factory.

interface MTextToolbarColorPickerContext {
    container: HTMLElement;
    initialColor: string;
    onChange: (hexColor: string) => void;
    theme: MTextToolbarTheme;
}

Properties

container: HTMLElement

Host element where custom UI should be mounted.

initialColor: string

Initial color as hex string (#RRGGBB).

onChange: (hexColor: string) => void

Call when user picks a new color.

theme: MTextToolbarTheme

Current toolbar theme.