3.9.2
π₯ Breaking Change
- Removed
Travis.CI
πππ EventsNative
module - renamed toEventEmitter
const editor = Jodit.make('#editor');
console.log(editor.e instanceof Jodit.modules.EventEmitter); // true
console.log(editor.events instanceof Jodit.modules.EventEmitter); // true
console.log(editor.events instanceof Jodit.modules.EventsNative); // true, deprecated
- BOOM: Move Ajax class into
request
folder.
import { Ajax } from 'jodit/src/core/request';
- Changed the signature of the send method in the Ajax API and is closer to the fetch () API
const editor = Jodit.make('#editor');
// Before
await new Ajax(editor, {
url: 'index.php'
}).send(); // {success: true, data: ...}
// Now
await new Ajax(editor, {
url: 'index.php'
})
.send()Λ
.then(resp => resp.json()); // {success: true, data: ...}
- In
.npmignore
added:- build-system/
- test.html
- .eslintrc.js
- .eslintignore
- .editorconfig
- .gitignore
- .prettierrc.json
- .stylelintrc
- app.css
- composer.json
π New Feature
In Dom
module added nextGen
and eachGen
methods. These methods return generators:
const editor = Jodit.make('#editor');
editor.value = '<ul><li><img>1</li><li>2</li><li>3</li></ul>';
const gen = Dom.nextGen(editor.editor.querySelector('img'), editor.editor);
let next = gen.next();
while (!next.done) {
console.log(next.value); // 1, LI, 2, LI, 3
next = gen.next();
}
const gen2 = Dom.eachGen(editor.editor);
let next2 = gen2.next();
while (!next2.done) {
console.log(next2.value); // UL, LI, 1, LI, 2, LI, 3
next2 = gen2.next();
}
π Bug Fix
- Indent doesn't work in table cell #729
- cleanHTML replaceOldTags doesn't seem to do anything #728
- Fixed Resize column table #712
- Font and font size settings are not applied to all text if part of it has been changed earlier #706
- Delete multi rows and colums #690
- When {"enter": "BR"} option is enabled, adding a heading to the text causes it to become wrapped by a "h*" tag #547
- Issue with clear format on
tags #680