4.0
4.0
π₯ Breaking Change
-
All static methods of the
Jodit.modules.Table
module have been removed and replaced with methods of an instance of theTable
class with the same name.const jodit = Jodit.make('#editor'); // Before Jodit.modules.Table.mergeSelected(jodit.editor.firstChild, jodit); // Now jodit.getInstance('Table').mergeSelected(jodit.editor.firstChild);
-
.jodit-filebrowser
class prefix was renamed to.jodit-file-browser
-
CSS key
--color-background-filebrowser-folders
was removed from global scope. -
Removed deprecated selection.applyStyle method
-
Changed Create.sandbox signature to return body,iframe tuple
-
In the plugin system, the requires field has been removed from instances,
only the field in the constructor has been leftclass somePlugin extends Jodit.modulules.Plugin { static requires = ['hotkeys']; // It still works requires = ['hotkeys']; // Now it does not work }
-
Deprecated were removed
-
Dom.isTag
does not support array -
Select.applyStyle
method was removed -
history.observer
was removed -
editorCssClass
removed -
wrapNodes.exclude
changed from array to set -
allowResizeTags
changed from array to set -
resizer.useAspectRatio
changed from array to set -
All css variables renamed to kebab-case
-
Remove all languages from lang/index.js for ESM build
-
Only base plugins list in plugins/index.js for ESM build
-
Remove polyfills from ESM build
-
Remove
composer.json
-
!!! Build files removed from repository and only available in npm package !!!
-
!!! bowers.json was removed !!!
-
server.js was removed
-
All build js files was rewritten to typescript
-
build-system
was renamed astools
-
Removed
exludeLangs
build option. Instead use--includeLanguages=en
option. -
Default target for build was changed to es2015
-
Build in es2018 target was removed, instead es2021 was added
-
Event
getIcon
was removed. Use optiongetIcon
instead
Jodit.make('#editor', {
getIcon: (name: string, clearName: string) => {
if (name === 'bold') {
return '<svg>...</svg>';
}
return null;
}
});
-
Removed
errorMessage
event. Usemodule.messages
insteadJodit.make('#editor').message.info('Hello world');
-
Removed
Jodit.modules.Helpers.val
method
π New Feature
-
Improved UX of dialog boxes. Added two options
closeOnEsc
defaulting totrue
andcloseOnClickOverlay
defaulting tofalse
.Jodit.make('#editor', { dialog: { closeOnEsc: true, closeOnClickOverlay: false } }); // or const editor = Jodit.make('#editor'); editor.alert('Hello world'); // closeOnEsc = true, closeOnClickOverlay = true editor .dlg({ closeOnEsc: false, closeOnClickOverlay: true }) .open();
-
The
Jodit.getInstance
method can accept a module constructor instead of its name:const jodit = Jodit.make('#editor'); const table = jodit.getInstance(Jodit.modules.Table); const table2 = jodit.getInstance('Table'); // It still works console.log(table === table2); // true
-
Even though I disable some editor plugins, they are displayed on mobile #243
-
Introduced the pasteExcludeStripTags option. This is a list of tags that won't be removed from the pasted HTML
when in INSERT_AS_TEXT mode. By default, it includes['br', 'hr']
.
See #1033 for more details.Jodit.make('#editor', { pasteExcludeStripTags: ['br', 'style'] });
-
copy pasting twitter or istagram or etc not as expected #1032
-
When cursor is not in view and paste is done, editor doesn't scroll to the pasted content automatically #983
Added scrollToPastedContent -
After inserting the HTML, the cursor will be inserted inside the block element
-
Added
Jodit.modules.Dom.isList
method -
Added
Jodit.modules.Dom.isLeaf
method -
Added plugin
delete
for correct delete content with commanddelete
π Bug Fix
-
Folder rename not working if "space" is added in folder name #1054
-
Fixed the logic of the file upload module. When HTTP errors were simply ignored.
-
Fixed a bug with the
editor.selection.setCursorIn(box)
method, which could set the cursor inside a
. -
Issues with ESM #1029, icons were not included in the esm build
Issue: #1029 -
Use node 18.17.1 for build
-
Fixed a bug where the cursor, when positioned at the start of the h1 tag and a style was applied to the h1 tag, would move up one tag level.
-
Fixed an issue where the inline popup was not hidden after deleting an image
π Internal
- Fixed colors for selected toolbar elements in the dark theme
@types/ace ^0.0.50 β ^0.0.52
@types/fs-extra ^11.0.3 β ^11.0.4
@types/karma ^6.3.6 β ^6.3.8
@types/node ^20.8.7 β ^20.10.3
@types/postcss-css-variables ^0.18.2 β ^0.18.3
@types/yargs ^17.0.29 β ^17.0.32
@typescript-eslint/eslint-plugin ^6.8.0 β ^6.13.2
@typescript-eslint/parser ^6.8.0 β ^6.13.2
axios ^1.5.1 β ^1.6.2
core-js ^3.33.1 β ^3.34.0
eslint ^8.52.0 β ^8.55.0
eslint-config-prettier ^9.0.0 β ^9.1.0
eslint-plugin-import ^2.28.1 β ^2.29.0
node-jq ^4.0.1 β ^4.2.2
postcss >=8.4.31 β >=8.4.32
prettier ^3.0.3 β ^3.1.0
stylelint-prettier ^4.0.2 β ^4.1.0
ts-loader ^9.5.0 β ^9.5.1
typescript ^5.2.2 β ^5.3.2
-
Fixed a bug in the UITextArea UI component. Instead of adding a textarea element, it was incorrectly adding an input element.
-
Calls to setTimout without the async module have been removed from autotests, and most of the asynchronous tests have been rewritten from done to async/await
-
Update dependencies
stylelint-config-idiomatic-order v9.0.0 β v10.0.0 stylelint-config-standard ^34.0.0 β ^36.0.0 stylelint-prettier ^4.1.0 β ^4.4.0 terser-webpack-plugin ^5.3.9 β ^5.3.10 ts-node ^10.9.1 β ^10.9.2 typescript ^5.3.2 β ^5.3.3 webpack-dev-middleware ^6.1.1 β ^7.0.0 webpack-hot-middleware ^2.25.4 β ^2.26.0
@types/node ^18.13.0 β ^18.15.12
@typescript-eslint/eslint-plugin ^5.50.0 β ^5.59.0
@typescript-eslint/parser ^5.50.0 β ^5.59.0
autoprefixer ^10.4.13 β ^10.4.14
axios ^1.3.3 β ^1.3.6
core-js ^3.28.0 β ^3.30.1
css-minimizer-webpack-plugin ^4.2.2 β ^5.0.0
cssnano-preset-advanced ^5.3.9 β ^6.0.0
eslint ^8.34.0 β ^8.38.0
eslint-config-prettier ^8.6.0 β ^8.8.0
expect-mocha-image-snapshot ^3.0.1 β ^3.0.13
glob ^8.1.0 β ^10.2.1
karma-chrome-launcher ^3.1.1 β ^3.2.0
lint-staged ^13.1.2 β ^13.2.1
mini-css-extract-plugin ^2.7.2 β ^2.7.5
postcss >=8.4.21 β >=8.4.23
postcss-css-variables ^0.18.0 β ^0.19.0
postcss-loader ^7.0.2 β ^7.2.4
prettier ^2.8.4 β ^2.8.7
puppeteer ^19.7.0 β ^19.10.0
style-loader ^3.3.1 β ^3.3.2
stylelint ^15.1.0 β ^15.5.0
stylelint-config-standard ^30.0.1 β ^33.0.0
stylelint-prettier ^2.0.0 β ^3.0.0
terser-webpack-plugin ^5.3.6 β ^5.3.7
tsc-alias ^1.8.2 β ^1.8.5
typescript ^4.9.5 β ^5.0.4
webpack 5.76.0 β 5.80.0
webpack-dev-middleware ^6.0.1 β ^6.0.2
webpack-dev-server ^4.11.1 β ^4.13.3
yargs ^17.6.2 β ^17.7.1