• Build color picker

    Example

    $tabs = TabsWidget(editor, {
    'Text' : ColorPickerWidget(editor, function (color) {
    box.style.color = color;
    }, box.style.color),
    'Background' : ColorPickerWidget(editor, function (color) {
    box.style.backgroundColor = color;
    }, box.style.backgroundColor),
    });

    Parameters

    • editor: IJodit
    • callback: ((newColor: string) => void)

      Callback 'function (color) {}'

        • (newColor: string): void
        • Parameters

          • newColor: string

          Returns void

    • coldColor: string

      Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)

    Returns HTMLDivElement

Jodit PRO

If you like Jodit - try Jodit PRO