@ckeditor/ckeditor5-undo 38.2.0-alpha.0 → 39.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +0 -1
- package/package.json +4 -5
- package/src/undocommand.js +4 -1
package/README.md
CHANGED
@@ -4,7 +4,6 @@ CKEditor 5 undo feature
|
|
4
4
|
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-undo.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-undo)
|
5
5
|
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
6
6
|
[![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5)
|
7
|
-
![Dependency Status](https://img.shields.io/librariesio/release/npm/@ckeditor/ckeditor5-undo)
|
8
7
|
|
9
8
|
This package implements undo support for CKEditor 5.
|
10
9
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-undo",
|
3
|
-
"version": "
|
3
|
+
"version": "39.0.0",
|
4
4
|
"description": "Undo feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -11,11 +11,10 @@
|
|
11
11
|
"ckeditor5-dll"
|
12
12
|
],
|
13
13
|
"main": "src/index.js",
|
14
|
-
"type": "module",
|
15
14
|
"dependencies": {
|
16
|
-
"@ckeditor/ckeditor5-core": "
|
17
|
-
"@ckeditor/ckeditor5-engine": "
|
18
|
-
"@ckeditor/ckeditor5-ui": "
|
15
|
+
"@ckeditor/ckeditor5-core": "39.0.0",
|
16
|
+
"@ckeditor/ckeditor5-engine": "39.0.0",
|
17
|
+
"@ckeditor/ckeditor5-ui": "39.0.0"
|
19
18
|
},
|
20
19
|
"engines": {
|
21
20
|
"node": ">=16.0.0",
|
package/src/undocommand.js
CHANGED
@@ -34,8 +34,11 @@ export default class UndoCommand extends BaseCommand {
|
|
34
34
|
this._undo(item.batch, undoingBatch);
|
35
35
|
const operations = this.editor.model.document.history.getOperations(item.batch.baseVersion);
|
36
36
|
this._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);
|
37
|
-
this.fire('revert', item.batch, undoingBatch);
|
38
37
|
});
|
38
|
+
// Firing `revert` event after the change block to make sure that it includes all changes from post-fixers
|
39
|
+
// and make sure that the selection is "stabilized" (the selection range is saved after undo is executed and then
|
40
|
+
// restored on redo, so it is important that the selection range is saved after post-fixers are done).
|
41
|
+
this.fire('revert', item.batch, undoingBatch);
|
39
42
|
this.refresh();
|
40
43
|
}
|
41
44
|
}
|