• Build tabs system

    Example

    let tabs = Jodit.modules.TabsWidget(editor, [
    {name: 'Images', content: '<div>Images</div>'},
    {name: 'Title 2': Jodit.modules.Helpers.dom('<div>Some content</div>')},
    {name: 'Color Picker': ColorPickerWidget(editor, function (color) {
    box.style.color = color;
    }, box.style.color)},
    ]);

    Parameters

    • jodit: IJodit
    • tabs: TabOption[]

      PlainObject where 'key' will be tab's Title and value is tab's content

    • Optional state: {
          __activeTab: string;
      }

      You can use for this param any HTML element for remembering active tab

      • __activeTab: string

    Returns HTMLDivElement

Jodit PRO

If you like Jodit - try Jodit PRO