Skip to content

Releases: xdan/jodit

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

3.24.5

14 Feb 13:43
Compare
Choose a tag to compare

3.24.5

πŸ› Bug Fix

🏠 Internal

core-js                             ^3.27.2  β†’   ^3.28.0
@types/node                       ^18.11.19  β†’  ^18.13.0
axios                                ^1.3.2  β†’    ^1.3.3
eslint                              ^8.33.0  β†’   ^8.34.0
karma-sourcemap-loader               ^0.3.8  β†’    ^0.4.0
lint-staged                         ^13.1.0  β†’   ^13.1.2
open                                 ^8.4.0  β†’    ^8.4.1
prettier                             ^2.8.3  β†’    ^2.8.4
puppeteer                           ^19.6.3  β†’   ^19.7.0
stylelint                          ^14.16.1  β†’   ^15.1.0
stylelint-config-prettier            ^9.0.4  β†’    ^9.0.5
stylelint-config-standard           ^29.0.0  β†’   ^30.0.1
synchronous-promise                  2.0.15  β†’    2.0.17

3.24.4

πŸ’₯ Breaking Change

  • Options to hide the functionality of editing directories and files filebrowser.createNewFolder, filebrowser.editImage,
    filebrowser.deleteFolder,filebrowser.renameFolder,filebrowser.moveFolder,filebrowser.moveFile were marked as deprecated.
  • Instead added filebrowser.permissionsPresets: Partial<IPermissions> option.

Before:

Jodit.make('#editor', {
	filebrowser: {
		createNewFolder: false,
		deleteFolder: false,
		renameFolder: false,
		moveFolder: false,
		moveFile: false,
		editImage: false,
		ajax: {
			url: 'https://xdsoft.net/jodit/finder/'
		}
	}
});

Now

Jodit.make('#editor', {
	filebrowser: {
		permissionsPresets: {
			allowFiles: false,
			allowFileMove: false,
			allowFileUpload: false,
			allowFileUploadRemote: false,
			allowFileRemove: false,
			allowFileRename: false,
			allowFolders: false,
			allowFolderCreate: false,
			allowFolderMove: false,
			allowFolderRemove: false,
			allowFolderRename: false,
			allowImageResize: false,
			allowImageCrop: false
		},
		ajax: {
			url: 'https://xdsoft.net/jodit/finder/'
		}
	}
});

3.24.3

🏠 Internal

 core-js                            ^3.26.1  β†’    ^3.27.2
 @types/node                       ^18.11.9  β†’  ^18.11.19
 @typescript-eslint/eslint-plugin   ^5.45.0  β†’    ^5.50.0
 @typescript-eslint/parser          ^5.45.0  β†’    ^5.50.0
 axios                               ^1.2.0  β†’     ^1.3.2
 css-loader                          ^6.7.2  β†’     ^6.7.3
 eslint                             ^8.28.0  β†’    ^8.33.0
 eslint-config-prettier              ^8.5.0  β†’     ^8.6.0
 eslint-plugin-import               ^2.26.0  β†’    ^2.27.5
 expect-mocha-image-snapshot        ^2.0.14  β†’     ^3.0.1
 glob                                ^8.0.3  β†’     ^8.1.0
 husky                               ^8.0.2  β†’     ^8.0.3
 lint-staged                        ^13.0.4  β†’    ^13.1.0
 mini-css-extract-plugin             ^2.7.0  β†’     ^2.7.2
 mocha                              ^10.1.0  β†’    ^10.2.0
 nock                               ^13.2.9  β†’    ^13.3.0
 postcss                           >=8.4.19  β†’   >=8.4.21
 postcss-loader                      ^7.0.1  β†’     ^7.0.2
 prettier                            ^2.8.0  β†’     ^2.8.3
 puppeteer                          ^19.3.0  β†’    ^19.6.3
 stylelint                         ^14.15.0  β†’   ^14.16.1
 synchronous-promise                 2.0.15  β†’     2.0.17
 ts-loader                           ^9.4.1  β†’     ^9.4.2
 tsc-alias                           ^1.7.1  β†’     ^1.8.2
 tslib                               ^2.4.1  β†’     ^2.5.0
 typescript                          ^4.9.3  β†’     ^4.9.5
 webpack-cli                         ^5.0.0  β†’     ^5.0.1

3.24.2

πŸš€ New Feature

3.24.4

05 Feb 22:25
Compare
Choose a tag to compare

3.24.4

πŸ’₯ Breaking Change

  • Options to hide the functionality of editing directories and files filebrowser.createNewFolder, filebrowser.editImage,
    filebrowser.deleteFolder,filebrowser.renameFolder,filebrowser.moveFolder,filebrowser.moveFile were marked as deprecated.
  • Instead added filebrowser.permissionsPresets: Partial<IPermissions> option.

Before:

Jodit.make('#editor', {
  filebrowser: {
    createNewFolder: false,
    deleteFolder: false,
    renameFolder: false,
    moveFolder: false,
    moveFile: false,
    editImage: false,
    ajax: {
      url: 'https://xdsoft.net/jodit/finder/'
    }
  },
});

Now

Jodit.make('#editor', {
  filebrowser: {
    permissionsPresets: {
      allowFiles: false,
      allowFileMove: false,
      allowFileUpload: false,
      allowFileUploadRemote: false,
      allowFileRemove: false,
      allowFileRename: false,
      allowFolders: false,
      allowFolderCreate: false,
      allowFolderMove: false,
      allowFolderRemove: false,
      allowFolderRename: false,
      allowImageResize: false,
      allowImageCrop: false,
    },
    ajax: {
      url: 'https://xdsoft.net/jodit/finder/'
    }
  },
});

3.24.3

🏠 Internal

 core-js                            ^3.26.1  β†’    ^3.27.2
 @types/node                       ^18.11.9  β†’  ^18.11.19
 @typescript-eslint/eslint-plugin   ^5.45.0  β†’    ^5.50.0
 @typescript-eslint/parser          ^5.45.0  β†’    ^5.50.0
 axios                               ^1.2.0  β†’     ^1.3.2
 css-loader                          ^6.7.2  β†’     ^6.7.3
 eslint                             ^8.28.0  β†’    ^8.33.0
 eslint-config-prettier              ^8.5.0  β†’     ^8.6.0
 eslint-plugin-import               ^2.26.0  β†’    ^2.27.5
 expect-mocha-image-snapshot        ^2.0.14  β†’     ^3.0.1
 glob                                ^8.0.3  β†’     ^8.1.0
 husky                               ^8.0.2  β†’     ^8.0.3
 lint-staged                        ^13.0.4  β†’    ^13.1.0
 mini-css-extract-plugin             ^2.7.0  β†’     ^2.7.2
 mocha                              ^10.1.0  β†’    ^10.2.0
 nock                               ^13.2.9  β†’    ^13.3.0
 postcss                           >=8.4.19  β†’   >=8.4.21
 postcss-loader                      ^7.0.1  β†’     ^7.0.2
 prettier                            ^2.8.0  β†’     ^2.8.3
 puppeteer                          ^19.3.0  β†’    ^19.6.3
 stylelint                         ^14.15.0  β†’   ^14.16.1
 synchronous-promise                 2.0.15  β†’     2.0.17
 ts-loader                           ^9.4.1  β†’     ^9.4.2
 tsc-alias                           ^1.7.1  β†’     ^1.8.2
 tslib                               ^2.4.1  β†’     ^2.5.0
 typescript                          ^4.9.3  β†’     ^4.9.5
 webpack-cli                         ^5.0.0  β†’     ^5.0.1

3.24.1

17 Dec 11:40
Compare
Choose a tag to compare

πŸ’₯ Breaking Change

  • Constant array MAY_BE_REMOVED_WITH_KEY was replaced on set INSEPARABLE_TAGS

πŸš€ New Feature

  • Method Select.applyStyle marked as deprecated. Use Select.commitStyle instead.

Before:

jodit.select.applyStyle(
	{ color: red },
	{
		element: 'strong'
	}
);

Now:

jodit.s.commitStyle({
	element: 'strong',
	attributes: {
		style: {
			color: 'red'
		}
	}
});
  • In the options of the Select.commitStyle method, the attributes property has been added, which allows you to
    also set attributes when applying a style.
jodit.s.commitStyle({
	element: 'a',
	attributes: {
		href: 'https://stename.ru'
	}
});

Wraps the selected text into a link with the specified address.

  • When inserting a url, if the text is selected, it will automatically be replaced with a link

  • In Tab plugin allow use shift+tab for lists

πŸ› Bug Fix

🏠 Internal

  • Fixed deletion of the asserts function from the production code, instead of regular expressions, transformers are used

3.23.3

20 Nov 19:29
Compare
Choose a tag to compare

3.23.3

πŸš€ New Feature

  • Added option IControlType.childExec Allows you to set a separate handler for list items
Jodit.make('.editor', {
	buttons: [
		{
			name: 'add-date',
			iconURL: 'stuf/dummy.png',
			list: {
				options: 'Open options'
			},
			exec(editor, current, control) {
				editor.s.insertHTML(new Date().toString());
			},
			childExec(editor, current, control) {
				if (control.args[0] === 'options') {
					editor.alert('Options');
				}
			}
		}
	]
});

3.23.2

πŸ› Bug Fix

🏠 Internal

  • Deleted ajax.dataType option, because it was not used

3.23.1

πŸ’₯ Breaking Change

  • Remove IJodit from first argument of Ajax constructor.

πŸš€ New Feature

  • The focus method and the isFocused property have been added to the IJodit interface.
    These are just aliases for the same methods and properties of the Select module.
const editor = Jodit.make('#editor');
editor.focus();
  • The IJodit.fetch method has been added to the IJodit interface,
    which is similar in signature to the fetch method in the browser
const editor = Jodit.make('#editor');
const data = await editor.fetch('https://somesite.com?type=json');

πŸ› Bug Fix

  • Fixed error when using superscript and subscript commands. If the cursor was inside sub or sup tags, then nothing happened.
  • Fixed a bug in the placeholder plugin when indent styles were set for the edit area,
    they were not taken into account in the positioning of the placeholder. As a result, it was shifted relative to the focus.

3.22.1

πŸ’₯ Breaking Change

  • ISnapshot.isBlocked - is readonly now
  • IHistory.snapshot - is readonly now
  • IHistory.processChanges and IHistory.upTick were removed.
  • Instead of IHistory.snapshot.isBlocked=true...IHistory.snapshot.isBlocked=false should be used IHistory.snapshot.transaction(() => {...})
  • IJodit.registerCommand<C extends string> - is generic now
  • IJodit.getNativeEditorValue - marked as internal, please do not use it in your code
  • To class .jodit-container was added background-color: var(--color-background-light-gray);
  • To class .jodit-workplace was added background-color: var(--color-background-default);
  • Selection markers now are marked as temporary with Dom.markTemporary
  • Search plugin move selection to the next found element after replacing. See bug fix section
  • WrapNodes plugin added emptyBlockAfterInit=true option. After the editor is initialized, if it is empty, an empty block will be added to it.

πŸ› Bug Fix

🏠 Internal

core-js                            ^3.25.5  β†’   ^3.26.0
@types/node                       ^18.11.0  β†’  ^18.11.9
@typescript-eslint/eslint-plugin   ^5.40.0  β†’   ^5.42.0
@typescript-eslint/parser          ^5.40.0  β†’   ^5.42.0
autoprefixer                      ^10.4.12  β†’  ^10.4.13
cssnano-preset-advanced             ^5.3.8  β†’    ^5.3.9
eslint                             ^8.25.0  β†’   ^8.26.0
puppeteer                          ^19.0.0  β†’   ^19.2.1
replace                             ^1.2.1  β†’    ^1.2.2
tslib                               ^2.4.0  β†’    ^2.4.1
yargs                              ^17.6.0  β†’   ^17.6.1

3.21.5

3.21.4

πŸ› Bug Fix

🏠 Internal

@types/node ^18.8.3 β†’ ^18.11.0
axios ^1.1.2 β†’ ^1.1.3
css-minimizer-webpack-plugin ^4.2.1 β†’ ^4.2.2
mocha ^10.0.0 β†’ ^10.1.0
postcss >=8.4.17 β†’ >=8.4.18
puppeteer ^18.2.1 β†’ ^19.0.0
stylelint ^14.13.0 β†’ ^14.14.0
stylelint-config-standard ^28.0.0 β†’ ^29.0.0

3.21.1

πŸ’₯ Breaking Change

  • Filebrowser adds a timestamp to the image preview url, now it will be the same as the server returned the changed field in the response.
    This is necessary for better caching in the browser.
  • cleanHTML.denyTags default equal script Those. script tags are disabled by default. If you need them then turn off this rule:
Jodit.make('#editor', {
	cleanHTML: {
		denyTags: false
	}
});
  • The order of the hotkeys plugin keys has been changed to a more popular one.
    It used to be: b+meta, b+ctrl
    Now: meta+b, ctrl+b
    This is expressed in the installation of handlers for keyboard shortcuts:
Jodit.make('#editor', { disablePlugins: ['bold'] }).e.on('meta+b', () => {
	alert('Do smth with text');
	return false;
});

🏠 Internal

  • Remove assert calls from production build.
  • Update deps
core-js                            ^3.24.1  β†’   ^3.25.5
@types/node                        ^18.7.3  β†’   ^18.8.3
@typescript-eslint/eslint-plugin   ^5.33.0  β†’   ^5.39.0
@typescript-eslint/parser          ^5.33.0  β†’   ^5.39.0
autoprefixer                       ^10.4.8  β†’  ^10.4.12
axios                              ^0.27.2  β†’    ^1.1.2
css-minimizer-webpack-plugin        ^4.0.0  β†’    ^4.2.1
eslint                             ^8.22.0  β†’   ^8.25.0
eslint-plugin-tsdoc                ^0.2.16  β†’   ^0.2.17
express                            ^4.18.1  β†’   ^4.18.2
karma                               ^6.4.0  β†’    ^6.4.1
less-loader                        ^11.0.0  β†’   ^11.1.0
postcss                           >=8.4.16  β†’  >=8.4.17
puppeteer                          ^17.0.0  β†’   ^18.2.1
stylelint                         ^14.10.0  β†’  ^14.13.0
stylelint-config-idiomatic-order    v8.1.0  β†’    v9.0.0
stylelint-config-standard          ^27.0.0  β†’   ^28.0.0
synchronous-promise                ^2.0.15  β†’   ^2.0.16
terser-webpack-plugin               ^5.3.4  β†’    ^5.3.6
ts-loader                           ^9.3.1  β†’    ^9.4.1
typescript                          ^4.8.2  β†’    ^4.8.4
webpack                             5.73.0  β†’    5.74.0
webpack-dev-server                  ^4.9.3  β†’   ^4.11.1
webpack-hot-middleware             ^2.25.1  β†’   ^2.25.2
yargs                              ^17.5.1  β†’   ^17.6.0

3.20.4

🏠 Internal

  • Move error-messages functionality to messages module.
  • Improved appearance of popup messages in the messages module.

πŸ› Bug Fix

  • Fixed a bug in the limit plugin. When the limit was reached, he checked the limits strictly,
    when entering from the keyboard. Therefore, every time I change the input focus.
  • Events are added to the same plugin when limits are reached.
    More details can be found in the documentation limit

3.20.3

🏠 Internal

  • En lang is loaded as is
  • Fix types generation:
    • Remove styles
    • Replace aliases

πŸ› Bug Fix

3.20.2

🏠 Internal

  • Tooltip plugin functionality moved to ui/button/tooltip so that it can be used not only with the editor

πŸ› Bug Fix

  • Fixed bug in add-new-line in iframe-mode

3.20.1

πŸš€ New Feature

  • Removed Panel and IPanel
  • Made IDlgs and Dlgs traits
  • Added @derive decorator
  • Mods/Elms/Dlgs traits now uses with @derive
  • Added dtd plugin. Read more

🏠 Internal

πŸ› Bug Fix

3.19.5

21 Aug 23:50
Compare
Choose a tag to compare

3.19.5

πŸš€ New Feature

πŸ› Bug Fix

3.19.4

πŸš€ New Feature

Jodit.make('#editor', {
	uploader: {
		url: 'https://sitename.net/jodit/connector/index.php?action=fileUpload',
		getDisplayName: (_, name) => 'File:' + name
	}
});
  • Added cleanHTML.useIframeSandbox:boolean option(default: false). Use iframe[sandbox] to paste HTML code into the editor to check it for safety.
    Allows you not to run scripts and handlers, but it works much slower

πŸ› Bug Fix

3.19.3

πŸ› Bug Fix

  • Quick fix bug with webpack output.clean=true.

3.19.2

πŸ› Bug Fix

  • Big bugfix in es2018 version, sideEffect cut all styles and configs

3.19.1

🏠 Internal

  • Plugin icons moved to their respective plugins
  • Used plugin webpack.ids.DeterministicModuleIdsPlugin for more reliable sharing of exported module names between builds.
    Now you can include plugins from 'es5' in the assembly for 'es2018.en'.
  • Deps
     @types/node                       ^17.0.36  β†’  ^17.0.41
     @typescript-eslint/eslint-plugin   ^5.27.0  β†’   ^5.27.1
     @typescript-eslint/parser          ^5.27.0  β†’   ^5.27.1
     cssnano-preset-advanced             ^5.3.6  β†’    ^5.3.7
     eslint                             ^8.16.0  β†’   ^8.17.0
     lint-staged                        ^12.4.3  β†’   ^13.0.0
     terser-webpack-plugin               ^5.3.1  β†’    ^5.3.3
     typescript                          ^4.7.2  β†’    ^4.7.3
     webpack                            ^5.72.1  β†’   ^5.73.0
     webpack-dev-server                  ^4.9.0  β†’    ^4.9.2
     core-js                            ^3.22.7  β†’   ^3.22.8
    

3.18.7

πŸš€ New Feature

πŸ› Bug Fix

3.18.6

πŸš€ New Feature

3.18.5

πŸ’₯ Breaking Change

  • Added default table style to createAttributes option:
Jodit.defaultOptions.createAttributes = {
	table: {
		style: 'border-collapse:collapse;width: 100%;'
	}
};

πŸ› Bug Fix

3.18.4

13 May 11:40
Compare
Choose a tag to compare

3.18.4

πŸš€ New Feature

  • Added option uploader.processFileName - The method can be used to change the name of the uploaded file
Jodit.make('#editor', {
	uploader: {
		url: 'some-connector.php',
		processFileName: (key, file, name) => {
			return [key, file, 'some-prefix_' + name];
		}
	}
});
  • Fixed file naming error when uploading to server

3.18.3

πŸ› Bug Fix

  • Fixed a bug where pressing Esc did not close the dialog

3.18.2

πŸ’₯ Breaking Change

The on/one/off methods of the Jodit Event System have been greatly simplified:

instead:

editor.e.on(
	'click',
	() => {
		alert('Clicked!');
	},
	undefined,
	true
);

Now:

editor.e.on(
	'click',
	() => {
		alert('Clicked!');
	},
	{
		top: true
	}
);

Also, the methods now support an array of events:

editor.e.on('click mousedown mouseup', () => {
	alert('Some event!');
});
editor.e.on(['click', 'mousedown', 'mouseup'], () => {
	alert('Some event!');
});

πŸš€ New Feature

πŸ› Bug Fix

🏠 Internal

  • Instead of a self-written truncated polyfill for Array.from, the core-js module is used

  • Moved the test files to the appropriate directories

  • Update deps

     @types/node                       ^17.0.23  β†’  ^17.0.31
     @typescript-eslint/eslint-plugin   ^5.19.0  β†’   ^5.22.0
     @typescript-eslint/parser          ^5.19.0  β†’   ^5.22.0
     autoprefixer                       ^10.4.4  β†’   ^10.4.7
     axios                              ^0.26.1  β†’   ^0.27.2
     eslint                             ^8.13.0  β†’   ^8.14.0
     express                            ^4.17.3  β†’   ^4.18.1
     karma                              ^6.3.17  β†’   ^6.3.19
     lint-staged                        ^12.3.7  β†’   ^12.4.1
     mocha                               ^9.2.2  β†’   ^10.0.0
     postcss                           >=8.4.12  β†’  >=8.4.13
     stylelint                          ^14.6.1  β†’   ^14.8.2
     ts-loader                           ^9.2.8  β†’    ^9.3.0
     tslib                               ^2.3.1  β†’    ^2.4.0
     typescript                          ^4.6.3  β†’    ^4.6.4
     webpack-dev-server                  ^4.8.1  β†’    ^4.9.0
     core-js                            ^3.21.1  β†’   ^3.22.4
    

3.17.1

πŸ’₯ Breaking Change

Some minifier configurations do not correctly handle inheritance in the component decorator,
we added some helper code earlier to make this work correctly.
We tried to determine belonging by the name of the component and not by its constructor or prototype.
Because in some build system(ex. create-react-app):

@component
class A extends Component {
	className() {
		return 'A';
	}
}
const a = new A();
a instanceof Component; // false - only in some cases
elm.className() === A.prototype.className(); // true

In most cases, this entailed new bugs, so in 3.17 we decided to remove this heuristic.
If something broke in your assembly, please create an issue on github.

πŸ› Bug Fix

const editor = Jodit.make('#editor');
editor.s.insertHTML('test', false);

🏠 Internal

  • Update
@typescript-eslint/eslint-plugin  ^5.16.0  β†’  ^5.19.0
@typescript-eslint/parser         ^5.16.0  β†’  ^5.19.0
cssnano-preset-advanced            ^5.3.1  β†’   ^5.3.3
eslint                            ^8.12.0  β†’  ^8.13.0
eslint-plugin-tsdoc               ^0.2.14  β†’  ^0.2.16
prettier                           ^2.6.1  β†’   ^2.6.2
webpack                           ^5.70.0  β†’  ^5.72.0
webpack-dev-server                 ^4.7.4  β†’   ^4.8.1
yargs                             ^17.4.0  β†’  ^17.4.1

3.16.6

πŸ› Bug Fix

3.16.5

27 Mar 23:52
Compare
Choose a tag to compare

3.16.5

πŸš€ New Feature

  • imageProcessor.replaceDataURIToBlobIdInView
    The imageProcessor plugin has added the functionality of replacing data-uri objects in the src of images with blob-url.
    This allows you to more conveniently work with an HTML document without loading the processor.
    Checks if the imageProcessor.replaceDataURIToBlobIdInView option is enabled then converts image src which has data:base64
    to blob-object-uri

In this case, Jodit.value returns images with data-uri. And original textarea itself does the reverse replacement take place.

const editor = Jodit.make('#editor', {
	imageProcessor: {
		replaceDataURIToBlobIdInView: true // This is the default value, but for examples we set it
	}
});

editor.value =
	'<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="/></p>';
console.log(editor.value); // <p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="/></p>
console.log(editor.getElementValue()); // '<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII="/></p>'
console.log(editor.getNativeEditorValue()); // <p><img src="blob:http://localhost:2000/03377cf0-6260-4351-82ad-8a8901ea104f"></p>
  • Method Jodit.setElementValue marked us deprecated and will be removed in next major release.

🏠 Internal

  • Update
@types/node                       ^17.0.21  β†’  ^17.0.23
@typescript-eslint/eslint-plugin   ^5.14.0  β†’   ^5.16.0
@typescript-eslint/parser          ^5.14.0  β†’   ^5.16.0
autoprefixer                       ^10.4.2  β†’   ^10.4.4
cssnano-preset-advanced             ^5.2.4  β†’    ^5.3.1
eslint                             ^8.11.0  β†’   ^8.12.0
lint-staged                        ^12.3.5  β†’   ^12.3.7
postcss                            >=8.4.8  β†’  >=8.4.12
prettier                            ^2.5.1  β†’    ^2.6.1
stylelint                          ^14.5.3  β†’   ^14.6.1
typescript                          ^4.6.2  β†’    ^4.6.3
yargs                              ^17.3.1  β†’   ^17.4.0

3.16.4

πŸ› Bug Fix

3.16.3

27 Mar 10:13
Compare
Choose a tag to compare

3.16.3

  • Fixed composition wait and debounce decorators

3.16.2

πŸ› Bug Fix

3.16.1

πŸš€ New Feature

  • Added spellcheck plugin.
  • Added Config.pasteHTMLActionList and Config.pasteFromWordActionList options #802.
  • Added Jodit.synchronizeValues() method. The method synchronizes the WYSIWYG values of the editor
  • and the original input field. The method works through Async.throttle.
  • Added a new class for working with DOM without blocking the main thread LazyWalker
  • Search engine replace on LazyWalker
  • CleanHTML plugin engine replace on LazyWalker
  • Search plugin now highlights all found options #798
  • Added Jodit.constants #806

πŸ’₯ Breaking Change

  • Renamed wrap-text-nodes plugin to wrap-nodes
  • Option spellcheck = false by default. This is due to the fact that the built-in spell check slows down the editor very much on large tests.
  • Enabled @typescript-eslint/explicit-function-return-type in eslint

πŸ› Bug Fix

🏠 Internal

  • clean-html plugin now works via requestIdleCallback and doesn't slow down the browser