The Jodit editor consists of modules and plugins. Modules make up the permanent basis of the editor's work, and plugins can add their own functionality [[plugin]].
The editor is initialized on a DOM element. It must already exist on the page:
Jodit.make('#editor');
You can also set a DOM element right away.
const elm = document.querySelector('#editor');Jodit.make(elm);
The [[Jodit.make]] method returns an instance of [[Jodit]].
const jodit = Jodit.make('#editor');console.log(jodit.isReady);
This is almost equivalent to
But the make method is preferable.
make
All customization of the editor is done through the [[Config]]:
Jodit.make('#editor', { height: 300});
Jodit instance has a module [[EventEmitter]]
const jodit = Jodit.make('#editor');jodit.events.on('keydown', e => { console.log(e.key);});
And the [[Select]] module, which allows you to manipulate the content of the editor through HTML insertion
const jodit = Jodit.make('#editor');jodit.s.focus();jodit.s.insertHTML('<p>test</p>');
If you like Jodit - try Jodit PRO
Jodit constructor
The Jodit editor consists of modules and plugins. Modules make up the permanent basis of the editor's work, and plugins can add their own functionality [[plugin]].
The editor is initialized on a DOM element. It must already exist on the page:
You can also set a DOM element right away.
The [[Jodit.make]] method returns an instance of [[Jodit]].
This is almost equivalent to
All customization of the editor is done through the [[Config]]:
Jodit instance has a module [[EventEmitter]]
And the [[Select]] module, which allows you to manipulate the content of the editor through HTML insertion