github xdan/jodit 3.18.4

latest releases: 4.2.29, 4.2.28, 4.2.27...
2 years ago

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

Don't miss a new jodit release

NewReleases is sending notifications on new releases.