Hierarchy

Properties

args?: any[]
childExec?: ((view, current, options) => any)

Type declaration

childTemplate?: ((jodit, key, value, button) => string)

Type declaration

command?: string

The command executes when the button is pressed. Allowed all

css?: IDictionary<string | string[]>
defaultValue?: string | string[]
exec?: ((view, current, options) => any)

Type declaration

getContent?: ((editor, control, button) => string | HTMLElement)

Type declaration

hotkeys?: string | string[]
icon?: string

String name for existing icons.

Example

var editor = Jodit.make('.editor', {
buttons: [
{
icon: 'source',
exec: function (editor) {
editor.toggleMode();
}
}
]
})
iconURL?: string

Use this property if you want set background image for the button. This icon can be 16 * 16 px in SVG or another image formats

isActive?: ((editor, control, button?) => boolean)

Type declaration

isChildActive?: ((editor, control, button?) => boolean)

Type declaration

isChildDisabled?: ((editor, control, button?) => boolean)

Type declaration

isDisabled?: ((editor, control, button?) => boolean)

Type declaration

isInput?: boolean

Drop-down list. A hash or array. You must specify the command which will be submitted for the hash key (or array value) (see .[[IJodit.execCommand]] or define 'exec' function. See example

Example

Jodit.make('#editor2', {
buttons: Jodit.defaultOptions.buttons.concat([{
name: 'listsss',
iconURL: 'stuf/dummy.png',
list: {
h1: 'insert Header 1',
h2: 'insert Header 2',
clear: 'Empty editor',
},
exec: (editor, current, control) => {
var key = control.args[0],
value = control.args[1];

if (key === 'clear') {
this.setEditorValue('');
return;
}
this.s.insertNode(this.c.element(key, ''));
this.message.info('Was inserted ' + value);
},
template: function (key, value) {
return '<div>' + value + '</div>';
}
});
mode?: Modes
name: string
popup?: ((jodit, current, control, close, button) => string | false | HTMLElement | IUIElement)

Type declaration

tagRegExp?: RegExp
tags?: HTMLTagNames[]

Tag list: when cursor inward tag from this list, button will be highlighted

template?: ((jodit, key, value) => string)

Type declaration

text?: string
tooltip?: string | ((editor, control, button?) => string)

Buttons hint

Type declaration

update?: ((button, editor) => void)

Type declaration

Jodit PRO

If you like Jodit - try Jodit PRO