Skip to content

Releases: xdan/jodit

4.0

08 Jan 12:16
Compare
Choose a tag to compare

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

New version 3.24.5. Read more https://github.com/xdan/jodit/blob/mast…

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

New version 3.24.4. Read more https://github.com/xdan/jodit/blob/mast…

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

New version 3.23.3. Read more https://github.com/xdan/jodit/blob/mast…

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

New version 3.19.5. Read more https://github.com/xdan/jodit/blob/mast…

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

New version 3.18.4. Read more https://github.com/xdan/jodit/blob/mast…

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

New version 3.16.5. Read more https://github.com/xdan/jodit/blob/mast…

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

New version 3.16.3. Read more https://github.com/xdan/jodit/blob/mast…

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

New version 3.15.3. Read more https://github.com/xdan/jodit/blob/mast…

07 Mar 15:29
Compare
Choose a tag to compare

3.15.3

💥 Breaking Change

  • Observer module renamed to History, accessed via Jodit.history
  • Jodit.observer field deprecated and will be removed in future releases
  • Changed to history in observer settings. The observer field has been deprecated.
  • Removed stack field from History class (former Observer).
  • Separated default editor timeout and history.timeout. Now the second setting is just for history.
    Timeouts for all asynchronous operations in Jodit now apply the defaultTimeout setting

Before:

const editor = Jodit.make({
	observer: {
		timeout: 122,
		maxHistoryLength: 100
	}
});
console.log(editor.defaultTimeout); // 122
editor.observer.stack.clear();

Now:

const editor = Jodit.make({
	defaultTimeout: 122,
	history: {
		timeout: 1000,
		maxHistoryLength: 100
	}
});
console.log(editor.defaultTimeout); // 122
editor.history.clear();
  • When adding information to the editor via Jodit.value, the history of changes will be process immediately,
    without a timeout. Read more #792

🐛 Bug Fix