Skip to content

3.18.4

Compare
Choose a tag to compare
@xdan xdan released this 13 May 11:40

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