Skip to content

Releases: xdan/jodit

4.6.2

01 Apr 20:30
Compare
Choose a tag to compare
New version 4.6.2 Read more https://github.com/xdan/jodit/blob/main/C…

4.6.1

23 Mar 21:48
Compare
Choose a tag to compare
New version 4.6.1 Read more https://github.com/xdan/jodit/blob/main/C…

4.5.20

23 Mar 20:45
Compare
Choose a tag to compare
New version 4.5.20 Read more https://github.com/xdan/jodit/blob/main/…

4.5.19

23 Mar 20:29
Compare
Choose a tag to compare
New version 4.5.19 Read more https://github.com/xdan/jodit/blob/main/…

4.5.17

20 Feb 08:13
Compare
Choose a tag to compare
New version 4.5.17 Read more https://github.com/xdan/jodit/blob/main/…

4.5.16

16 Feb 23:22
Compare
Choose a tag to compare
New version 4.5.16 Read more https://github.com/xdan/jodit/blob/main/…

4.5.15

16 Feb 22:55
Compare
Choose a tag to compare

Full Changelog: 4.5.14...4.5.15

4.5.12

15 Feb 11:17
Compare
Choose a tag to compare

4.5.12

🏠 Internal

 @eslint/compat                      ^1.2.3  β†’    ^1.2.6
 @eslint/js                         ^9.16.0  β†’   ^9.20.0
 @playwright/test                   ^1.49.0  β†’   ^1.50.1
 @swc/core                         ^1.10.11  β†’  ^1.10.16
 @types/node                       ^22.10.1  β†’  ^22.13.4
 @typescript-eslint/eslint-plugin   ^8.16.0  β†’   ^8.24.0
 @typescript-eslint/parser          ^8.16.0  β†’   ^8.24.0
 axios                               ^1.7.8  β†’    ^1.7.9
 compression                         ^1.7.5  β†’    ^1.8.0
 core-js                            ^3.39.0  β†’   ^3.40.0
 dotenv                             ^16.4.5  β†’   ^16.4.7
 eslint                             ^9.16.0  β†’   ^9.20.1
 eslint-config-prettier              ^9.1.0  β†’   ^10.0.1
 eslint-plugin-prettier              ^5.2.1  β†’    ^5.2.3
 glob                               ^11.0.0  β†’   ^11.0.1
 globals                           ^15.12.0  β†’  ^15.15.0
 less                                ^4.2.1  β†’    ^4.2.2
 mocha                              ^10.8.2  β†’   ^11.1.0
 postcss                           >=8.4.49  β†’   >=8.5.2
 prettier                            ^3.4.1  β†’    ^3.5.1
 stylelint                         ^16.11.0  β†’  ^16.14.1
 stylelint-config-standard          ^36.0.1  β†’   ^37.0.0
 stylelint-prettier                  ^5.0.2  β†’    ^5.0.3
 terser-webpack-plugin              ^5.3.10  β†’   ^5.3.11
 ts-loader                           ^9.5.1  β†’    ^9.5.2
 typescript                          ^5.7.2  β†’    ^5.7.3
 webpack                             5.96.1  β†’    5.98.0
 webpack-cli                         ^5.1.4  β†’    ^6.0.1
 webpack-dev-server                  ^5.1.0  β†’    ^5.2.0

4.5.10

🏠 Internal

  • Shit of the Chai JS module to the browser because the developers decided not to support the assembly for browsers anymore

πŸš€ New Feature

const editor = Jodit.make('#editor');
editor.schedulePostTask(
	() => {
		console.log('Task 1');
	},
	{ priority: 'user-blocking' }
);

4.5.5

πŸš€ New Feature

  • Added the ability to add their html inserts to the plugin paste
Jodit.make('#editor', {
	events: {
		onCustomPasteHTMLOption: (action, html) => {
			if (action === 'custom') {
				const div = document.createElement('div');
				div.innerHTML = html;
				const spans = div.querySelectorAll('span');
				for (let i = 0; i < spans.length; i++) {
					const span = spans[i];
					const p = document.createElement('p');
					p.innerHTML = span.innerHTML;
					span.parentNode.replaceChild(p, span);
				}
				return div.innerHTML;
			}
		}
	},
	pasteHTMLActionList: [
		{
			text: 'Custom',
			value: 'custom'
		}
	]
});

4.5.4

🏠 Internal

  • ESM build is going to the ES2018 target, not ES2020. This is due to the fact that the ES2020 target is not supported by all browsers. The ES2018 target is supported by all modern browsers. If you need to support older browsers, you can use the ES5 build.

4.5.2

πŸš€ New Feature

  • Added plugins/all.js for ESM build
import { Jodit } from 'jodit/esm/index.js';
console.log(Jodit.plugins.size); // 21 See. https://github.com/xdan/jodit/blob/main/tools/utils/resolve-alias-imports.ts#L81
import 'jodit/esm/plugins/all.js';
console.log(Jodit.plugins.size); // 62 and more in the future

4.5.1

πŸ’₯ Breaking Change

  • If the cleanHTML.allowTags option was set, then this did not affect cleanHTML.denyTags. Now if both options are set,
    then cleanHTML.denyTags will only be applied to those tags that are not indicated in cleanHTML.allowTags
Jodit.make('#editor', {
	cleanHTML: {
		allowTags: 'script,p', // Only Script and P tags will be allowed
		denyTags: 'script,img' // This option is completely ignored
	}
});

4.4.8

πŸ› Bug Fix

  • Fixed an error when in Jodit in the line transfer mode BR, when the indent button pressed the element was removed

4.3.1

πŸ’₯ Breaking Change

  • Added the popupRoot option for all IViewBased classes (Dialog, Jodit, FileBrowser). Allows you to specify the parental element of dialogs and popup windows.
  • If the option is not specified, then when creating a dialogue, there is a bypass of a tree, starting with the editor. If an element is found dialog or eny element with position: fixed or position: absolute, then it is used as a parent.
  • Also, shadowRoot can be used as a popupRoot

Those. Parent search priorities:

  1. popupRoot option
  2. shadowRoot option
  3. The closest element dialog or with style position: fixed or position: absolute
  4. document.body

This is necessary in cases where Jodit is displayed inside the dialog windows with a focus interception.
For example, when inserting in [mui dialog] (https://mui.com/material-ui/react-dialog/)

If this is your situation, then in most cases you won't need to do anything, as Jodit will find the correct parent element on its own.
But if your code logic was configured specifically to insert into document.body, then you will need to explicitly specify popupRoot: document.body

const editor = Jodit.make('#editor', {
	popupRoot: document.body
});

4.2.5

22 Apr 20:44
Compare
Choose a tag to compare

4.2.1

πŸ› Bug Fix

4.1.12

πŸ’₯ Breaking Change

  • Removed the default export from the watch decorator. We refrain from using default exports in this project (refer to CONTRIBUTING.md for more details).

Before:

import watch, { watch as watch2 } from 'jodit/core/decorators/watch/watch';

Now only:

import { watch } from 'jodit/core/decorators/watch/watch';

πŸ› Bug Fix

4.1.11

  • Fixed a bug within the FileBrowser module. The issue was due to the import order; the Ajax configuration was applied after the module had been initialized.

4.1.9

  • Added AbortError to the Jodit.modules namespace. This is a custom error that is thrown when the user cancels the operation.
const jodit = Jodit.make('#editor');
jodit.async
	.promise((res, rej) => fetch('./test.php').then(res).catch(rej))
	.catch(error => {
		if (Jodit.modules.Helpers.isAbortError(error)) {
			console.log('Operation was aborted');
		}
	});
jodit.destruct();

4.1.7

4.1.1

🏠 Internal

  • Update dependencies

@tsconfig/node18                    ^18.2.2  β†’   ^18.2.4
@types/node                       ^20.11.25  β†’  ^20.12.2
@typescript-eslint/eslint-plugin     ^7.1.1  β†’    ^7.5.0
@typescript-eslint/parser            ^7.1.1  β†’    ^7.5.0
autoprefixer                       ^10.4.18  β†’  ^10.4.19
axios                                ^1.6.7  β†’    ^1.6.8
core-js                             ^3.36.0  β†’   ^3.36.1
cssnano-preset-advanced              ^6.1.0  β†’    ^6.1.2
eslint-plugin-mocha                 ^10.4.0  β†’   ^10.4.1
glob                               ^10.3.10  β†’  ^10.3.12
mocha                               ^10.3.0  β†’   ^10.4.0
open                                ^10.0.4  β†’   ^10.1.0
postcss                            >=8.4.35  β†’  >=8.4.38
stylelint                           ^16.2.1  β†’   ^16.3.1
typescript                           ^5.4.2  β†’    ^5.4.3
webpack                              5.90.3  β†’    5.91.0
webpack-dev-middleware               ^7.0.0  β†’    ^7.2.0
webpack-dev-server                   ^5.0.2  β†’    ^5.0.4
  • Update dependencies
@types/node                       ^20.10.7  β†’  ^20.11.25
@typescript-eslint/eslint-plugin   ^6.18.0  β†’     ^7.1.1
@typescript-eslint/parser          ^6.18.0  β†’     ^7.1.1
autoprefixer                      ^10.4.16  β†’   ^10.4.18
axios                               ^1.6.5  β†’     ^1.6.7
core-js                            ^3.35.0  β†’    ^3.36.0
css-loader                          ^6.8.1  β†’    ^6.10.0
css-minimizer-webpack-plugin        ^5.0.1  β†’     ^6.0.0
cssnano-preset-advanced             ^6.0.3  β†’     ^6.1.0
eslint                             ^8.56.0  β†’    ^8.57.0
eslint-plugin-mocha                ^10.2.0  β†’    ^10.4.0
eslint-plugin-prettier              ^5.1.2  β†’     ^5.1.3
karma                               ^6.4.2  β†’     ^6.4.3
karma-firefox-launcher              ^2.1.2  β†’     ^2.1.3
less-loader                        ^11.1.4  β†’    ^12.2.0
mini-css-extract-plugin             ^2.7.6  β†’     ^2.8.1
mocha                              ^10.2.0  β†’    ^10.3.0
node-jq                             ^4.2.2  β†’     ^4.3.1
open                               ^10.0.3  β†’    ^10.0.4
postcss                           >=8.4.33  β†’   >=8.4.35
postcss-loader                      ^7.3.4  β†’     ^8.1.1
prettier                            ^3.1.1  β†’     ^3.2.5
style-loader                        ^3.3.3  β†’     ^3.3.4
stylelint                          ^16.1.0  β†’    ^16.2.1
typescript                          ^5.3.3  β†’     ^5.4.2
webpack                             5.89.0  β†’     5.90.3
webpack-dev-server                 ^4.15.1  β†’     ^5.0.2
webpack-hot-middleware             ^2.26.0  β†’    ^2.26.1

4.0.15

  • Fixed bug in beforeInit hook. If the hook returned a promise, and the editor was destroyed after that,
    then after resolving the promise, the editor continued the initialization procedure

4.0.8

  • Fixed a bug in the plugins module when extra plugins did not cause the editor to be redrawn after initialization

4.0.7

4.0.2

4.0

08 Jan 12:16
Compare
Choose a tag to compare
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 the Table 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 left

    class 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 as tools

  • 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 option getIcon instead

Jodit.make('#editor', {
	getIcon: (name: string, clearName: string) => {
		if (name === 'bold') {
			return '<svg>...</svg>';
		}

		return null;
	}
});
  • Removed errorMessage event. Use module.messages instead

    Jodit.make('#editor').message.info('Hello world');
  • Removed Jodit.modules.Helpers.val method

πŸš€ New Feature

  • Improved UX of dialog boxes. Added two options closeOnEsc defaulting to true and closeOnClickOverlay defaulting to false.

    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 command delete

πŸ› Bug Fix

🏠 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