@ckeditor/ckeditor5-undo 28.0.0 → 30.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.md +1 -1
- package/README.md +2 -2
- package/package.json +16 -15
- package/src/basecommand.js +26 -1
- package/CHANGELOG.md +0 -204
package/LICENSE.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Software License Agreement
|
2
2
|
==========================
|
3
3
|
|
4
|
-
**CKEditor 5
|
4
|
+
**CKEditor 5 undo feature** – https://github.com/ckeditor/ckeditor5-undo <br>
|
5
5
|
Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
|
6
6
|
|
7
7
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
package/README.md
CHANGED
@@ -2,8 +2,8 @@ CKEditor 5 undo feature
|
|
2
2
|
========================================
|
3
3
|
|
4
4
|
[![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-undo.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-undo)
|
5
|
-
[![
|
6
|
-
[![
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
6
|
+
[![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://travis-ci.com/ckeditor/ckeditor5)
|
7
7
|
|
8
8
|
This package implements undo support for CKEditor 5.
|
9
9
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-undo",
|
3
|
-
"version": "
|
4
|
-
"description": "Undo
|
3
|
+
"version": "30.0.0",
|
4
|
+
"description": "Undo feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
7
7
|
"ckeditor5",
|
@@ -12,20 +12,20 @@
|
|
12
12
|
],
|
13
13
|
"main": "src/index.js",
|
14
14
|
"dependencies": {
|
15
|
-
"@ckeditor/ckeditor5-core": "^
|
16
|
-
"@ckeditor/ckeditor5-engine": "^
|
17
|
-
"@ckeditor/ckeditor5-ui": "^
|
15
|
+
"@ckeditor/ckeditor5-core": "^30.0.0",
|
16
|
+
"@ckeditor/ckeditor5-engine": "^30.0.0",
|
17
|
+
"@ckeditor/ckeditor5-ui": "^30.0.0"
|
18
18
|
},
|
19
19
|
"devDependencies": {
|
20
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
21
|
-
"@ckeditor/ckeditor5-clipboard": "^
|
22
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
23
|
-
"@ckeditor/ckeditor5-enter": "^
|
24
|
-
"@ckeditor/ckeditor5-heading": "^
|
25
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
26
|
-
"@ckeditor/ckeditor5-typing": "^
|
27
|
-
"@ckeditor/ckeditor5-table": "^
|
28
|
-
"@ckeditor/ckeditor5-utils": "^
|
20
|
+
"@ckeditor/ckeditor5-basic-styles": "^30.0.0",
|
21
|
+
"@ckeditor/ckeditor5-clipboard": "^30.0.0",
|
22
|
+
"@ckeditor/ckeditor5-editor-classic": "^30.0.0",
|
23
|
+
"@ckeditor/ckeditor5-enter": "^30.0.0",
|
24
|
+
"@ckeditor/ckeditor5-heading": "^30.0.0",
|
25
|
+
"@ckeditor/ckeditor5-paragraph": "^30.0.0",
|
26
|
+
"@ckeditor/ckeditor5-typing": "^30.0.0",
|
27
|
+
"@ckeditor/ckeditor5-table": "^30.0.0",
|
28
|
+
"@ckeditor/ckeditor5-utils": "^30.0.0"
|
29
29
|
},
|
30
30
|
"engines": {
|
31
31
|
"node": ">=12.0.0",
|
@@ -43,6 +43,7 @@
|
|
43
43
|
"files": [
|
44
44
|
"lang",
|
45
45
|
"src",
|
46
|
-
"theme"
|
46
|
+
"theme",
|
47
|
+
"ckeditor5-metadata.json"
|
47
48
|
]
|
48
49
|
}
|
package/src/basecommand.js
CHANGED
@@ -42,7 +42,32 @@ export default class BaseCommand extends Command {
|
|
42
42
|
// Refresh state, so the command is inactive right after initialization.
|
43
43
|
this.refresh();
|
44
44
|
|
45
|
-
|
45
|
+
// Set the transparent batch for the `editor.data.set()` call if the
|
46
|
+
// batch type is not set already.
|
47
|
+
this.listenTo( editor.data, 'set', ( evt, data ) => {
|
48
|
+
// Create a shallow copy of the options to not change the original args.
|
49
|
+
// And make sure that an object is assigned to data[ 1 ].
|
50
|
+
data[ 1 ] = { ...data[ 1 ] };
|
51
|
+
|
52
|
+
const options = data[ 1 ];
|
53
|
+
|
54
|
+
if ( options.batchType ) {
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
|
58
|
+
options.batchType = 'transparent';
|
59
|
+
}, { priority: 'high' } );
|
60
|
+
|
61
|
+
// Clear the stack for the `transparent` batches.
|
62
|
+
this.listenTo( editor.data, 'set', ( evt, data ) => {
|
63
|
+
// We can assume that the object exists - it was ensured
|
64
|
+
// with the high priority listener before.
|
65
|
+
const options = data[ 1 ];
|
66
|
+
|
67
|
+
if ( options.batchType === 'transparent' ) {
|
68
|
+
this.clearStack();
|
69
|
+
}
|
70
|
+
} );
|
46
71
|
}
|
47
72
|
|
48
73
|
/**
|
package/CHANGELOG.md
DELETED
@@ -1,204 +0,0 @@
|
|
1
|
-
Changelog
|
2
|
-
=========
|
3
|
-
|
4
|
-
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
|
5
|
-
|
6
|
-
Changes for the past releases are available below.
|
7
|
-
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-undo/compare/v18.0.0...v19.0.0) (2020-04-29)
|
9
|
-
|
10
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
11
|
-
|
12
|
-
|
13
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-undo/compare/v17.0.0...v18.0.0) (2020-03-19)
|
14
|
-
|
15
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
16
|
-
|
17
|
-
|
18
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-undo/compare/v16.0.0...v17.0.0) (2020-02-19)
|
19
|
-
|
20
|
-
### Bug fixes
|
21
|
-
|
22
|
-
* Focus the editor before executing toolbar buttons' command. See [ckeditor/ckeditor5#353](https://github.com/ckeditor/ckeditor5/issues/353). ([f56cc26](https://github.com/ckeditor/ckeditor5-undo/commit/f56cc26))
|
23
|
-
|
24
|
-
### Other changes
|
25
|
-
|
26
|
-
* Updated translations. ([847543d](https://github.com/ckeditor/ckeditor5-undo/commit/847543d))
|
27
|
-
|
28
|
-
|
29
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-undo/compare/v15.0.0...v16.0.0) (2019-12-04)
|
30
|
-
|
31
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
32
|
-
|
33
|
-
|
34
|
-
## [15.0.0](https://github.com/ckeditor/ckeditor5-undo/compare/v11.0.5...v15.0.0) (2019-10-23)
|
35
|
-
|
36
|
-
### Other changes
|
37
|
-
|
38
|
-
* Added `pluginName` property to editing plugin. ([0b19643](https://github.com/ckeditor/ckeditor5-undo/commit/0b19643))
|
39
|
-
* Updated translations. ([c37a6c4](https://github.com/ckeditor/ckeditor5-undo/commit/c37a6c4)) ([1005475](https://github.com/ckeditor/ckeditor5-undo/commit/1005475))
|
40
|
-
|
41
|
-
|
42
|
-
## [11.0.5](https://github.com/ckeditor/ckeditor5-undo/compare/v11.0.4...v11.0.5) (2019-08-26)
|
43
|
-
|
44
|
-
### Other changes
|
45
|
-
|
46
|
-
* The issue tracker for this package was moved to https://github.com/ckeditor/ckeditor5/issues. See [ckeditor/ckeditor5#1988](https://github.com/ckeditor/ckeditor5/issues/1988). ([da87bf9](https://github.com/ckeditor/ckeditor5-undo/commit/da87bf9))
|
47
|
-
* Made the undo and redo button icons match the editor UI language direction. See [ckeditor/ckeditor5#1151](https://github.com/ckeditor/ckeditor5/issues/1151). ([e5df329](https://github.com/ckeditor/ckeditor5-undo/commit/e5df329))
|
48
|
-
* Updated translations. ([6f5803f](https://github.com/ckeditor/ckeditor5-undo/commit/6f5803f))
|
49
|
-
|
50
|
-
|
51
|
-
## [11.0.4](https://github.com/ckeditor/ckeditor5-undo/compare/v11.0.3...v11.0.4) (2019-07-10)
|
52
|
-
|
53
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
54
|
-
|
55
|
-
|
56
|
-
## [11.0.3](https://github.com/ckeditor/ckeditor5-undo/compare/v11.0.2...v11.0.3) (2019-07-04)
|
57
|
-
|
58
|
-
### Other changes
|
59
|
-
|
60
|
-
* Use transparent batches in undo & redo commands. Closes [#97](https://github.com/ckeditor/ckeditor5-undo/issues/97). ([ef8b640](https://github.com/ckeditor/ckeditor5-undo/commit/ef8b640))
|
61
|
-
|
62
|
-
|
63
|
-
## [11.0.2](https://github.com/ckeditor/ckeditor5-undo/compare/v11.0.1...v11.0.2) (2019-06-05)
|
64
|
-
|
65
|
-
### Other changes
|
66
|
-
|
67
|
-
* Updated translations. ([af36370](https://github.com/ckeditor/ckeditor5-undo/commit/af36370))
|
68
|
-
|
69
|
-
|
70
|
-
## [11.0.1](https://github.com/ckeditor/ckeditor5-undo/compare/v11.0.0...v11.0.1) (2019-04-10)
|
71
|
-
|
72
|
-
### Other changes
|
73
|
-
|
74
|
-
* Updated translations. ([69faf7c](https://github.com/ckeditor/ckeditor5-undo/commit/69faf7c))
|
75
|
-
|
76
|
-
|
77
|
-
## [11.0.0](https://github.com/ckeditor/ckeditor5-undo/compare/v10.0.4...v11.0.0) (2019-02-28)
|
78
|
-
|
79
|
-
### Other changes
|
80
|
-
|
81
|
-
* Updated translations. ([b4b0015](https://github.com/ckeditor/ckeditor5-undo/commit/b4b0015)) ([345a34e](https://github.com/ckeditor/ckeditor5-undo/commit/345a34e)) ([5197001](https://github.com/ckeditor/ckeditor5-undo/commit/5197001))
|
82
|
-
|
83
|
-
### BREAKING CHANGES
|
84
|
-
|
85
|
-
* Upgraded minimal versions of Node to `8.0.0` and npm to `5.7.1`. See: [ckeditor/ckeditor5#1507](https://github.com/ckeditor/ckeditor5/issues/1507). ([612ea3c](https://github.com/ckeditor/ckeditor5-cloud-services/commit/612ea3c))
|
86
|
-
|
87
|
-
|
88
|
-
## [10.0.4](https://github.com/ckeditor/ckeditor5-undo/compare/v10.0.3...v10.0.4) (2018-12-05)
|
89
|
-
|
90
|
-
### Other changes
|
91
|
-
|
92
|
-
* Improved SVG icons size. See [ckeditor/ckeditor5-theme-lark#206](https://github.com/ckeditor/ckeditor5-theme-lark/issues/206). ([6c8959b](https://github.com/ckeditor/ckeditor5-undo/commit/6c8959b))
|
93
|
-
* Updated translations. ([b2fe351](https://github.com/ckeditor/ckeditor5-undo/commit/b2fe351))
|
94
|
-
|
95
|
-
|
96
|
-
## [10.0.3](https://github.com/ckeditor/ckeditor5-undo/compare/v10.0.2...v10.0.3) (2018-10-08)
|
97
|
-
|
98
|
-
### Other changes
|
99
|
-
|
100
|
-
* Updated translations. ([7aec2df](https://github.com/ckeditor/ckeditor5-undo/commit/7aec2df))
|
101
|
-
|
102
|
-
|
103
|
-
## [10.0.2](https://github.com/ckeditor/ckeditor5-undo/compare/v10.0.1...v10.0.2) (2018-07-18)
|
104
|
-
|
105
|
-
### Other changes
|
106
|
-
|
107
|
-
* Updated translations. ([433de24](https://github.com/ckeditor/ckeditor5-undo/commit/433de24))
|
108
|
-
|
109
|
-
|
110
|
-
## [10.0.1](https://github.com/ckeditor/ckeditor5-undo/compare/v10.0.0...v10.0.1) (2018-06-21)
|
111
|
-
|
112
|
-
### Other changes
|
113
|
-
|
114
|
-
* Updated translations. ([d5942d5](https://github.com/ckeditor/ckeditor5-undo/commit/d5942d5))
|
115
|
-
|
116
|
-
|
117
|
-
## [10.0.0](https://github.com/ckeditor/ckeditor5-undo/compare/v1.0.0-beta.4...v10.0.0) (2018-04-25)
|
118
|
-
|
119
|
-
### Other changes
|
120
|
-
|
121
|
-
* Changed the license to GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991). ([bba4a8a](https://github.com/ckeditor/ckeditor5-undo/commit/bba4a8a))
|
122
|
-
|
123
|
-
### BREAKING CHANGES
|
124
|
-
|
125
|
-
* The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
126
|
-
|
127
|
-
|
128
|
-
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-undo/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018-04-19)
|
129
|
-
|
130
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
131
|
-
|
132
|
-
|
133
|
-
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-undo/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018-04-10)
|
134
|
-
|
135
|
-
### Bug fixes
|
136
|
-
|
137
|
-
* `UndoCommand` and `RedoCommand` should pass batch in `model.Model#enqueueChange` call. Closes [#84](https://github.com/ckeditor/ckeditor5-undo/issues/84). ([497af30](https://github.com/ckeditor/ckeditor5-undo/commit/497af30))
|
138
|
-
|
139
|
-
|
140
|
-
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-undo/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018-03-15)
|
141
|
-
|
142
|
-
### Features
|
143
|
-
|
144
|
-
* Updated icons for compatibility with the refreshed Lark theme. Minor adjustment in toolbar configuration (see [ckeditor/ckeditor5#645](https://github.com/ckeditor/ckeditor5/issues/645)). ([254cd89](https://github.com/ckeditor/ckeditor5-undo/commit/254cd89))
|
145
|
-
|
146
|
-
### Bug fixes
|
147
|
-
|
148
|
-
* Do not register batches which have only non-document operations. Closes [#79](https://github.com/ckeditor/ckeditor5-undo/issues/79). Closes [ckeditor/ckeditor5#781](https://github.com/ckeditor/ckeditor5/issues/781). ([60ac1ab](https://github.com/ckeditor/ckeditor5-undo/commit/60ac1ab))
|
149
|
-
|
150
|
-
### Other changes
|
151
|
-
|
152
|
-
* Aligned feature class naming to the new scheme. ([d4f0cc2](https://github.com/ckeditor/ckeditor5-undo/commit/d4f0cc2))
|
153
|
-
* Updated translations. ([33171d5](https://github.com/ckeditor/ckeditor5-undo/commit/33171d5))
|
154
|
-
|
155
|
-
|
156
|
-
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-undo/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017-11-14)
|
157
|
-
|
158
|
-
### Other changes
|
159
|
-
|
160
|
-
* Updated translations. ([847838f](https://github.com/ckeditor/ckeditor5-undo/commit/847838f))
|
161
|
-
|
162
|
-
|
163
|
-
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-undo/compare/v0.9.0...v1.0.0-alpha.1) (2017-10-03)
|
164
|
-
|
165
|
-
### Bug fixes
|
166
|
-
|
167
|
-
* Selection should be correctly restored when undoing after all editor content was replaced or removed. Closes [#72](https://github.com/ckeditor/ckeditor5-undo/issues/72). ([58f953f](https://github.com/ckeditor/ckeditor5-undo/commit/58f953f))
|
168
|
-
|
169
|
-
|
170
|
-
## [0.9.0](https://github.com/ckeditor/ckeditor5-undo/compare/v0.8.1...v0.9.0) (2017-09-03)
|
171
|
-
|
172
|
-
### Other changes
|
173
|
-
|
174
|
-
* Aligned the implementation to the new Command API (see https://github.com/ckeditor/ckeditor5-core/issues/88). ([a94dd46](https://github.com/ckeditor/ckeditor5-undo/commit/a94dd46))
|
175
|
-
* Cleaned up SVG icons. ([9cb1923](https://github.com/ckeditor/ckeditor5-undo/commit/9cb1923))
|
176
|
-
|
177
|
-
### BREAKING CHANGES
|
178
|
-
|
179
|
-
* The command API has been changed.
|
180
|
-
|
181
|
-
|
182
|
-
## [0.8.1](https://github.com/ckeditor/ckeditor5-undo/compare/v0.8.0...v0.8.1) (2017-05-07)
|
183
|
-
|
184
|
-
### Other changes
|
185
|
-
|
186
|
-
* Updated translations. ([d3847a6](https://github.com/ckeditor/ckeditor5-undo/commit/d3847a6))
|
187
|
-
|
188
|
-
|
189
|
-
## [0.8.0](https://github.com/ckeditor/ckeditor5-undo/compare/v0.7.1...v0.8.0) (2017-04-05)
|
190
|
-
|
191
|
-
### Features
|
192
|
-
|
193
|
-
* Named existing plugin(s). ([90ab21c](https://github.com/ckeditor/ckeditor5-undo/commit/90ab21c))
|
194
|
-
|
195
|
-
### Other changes
|
196
|
-
|
197
|
-
* Updated translations. ([730bf75](https://github.com/ckeditor/ckeditor5-undo/commit/730bf75))
|
198
|
-
|
199
|
-
|
200
|
-
## [0.7.1](https://github.com/ckeditor/ckeditor5-undo/compare/v0.7.0...v0.7.1) (2017-03-06)
|
201
|
-
|
202
|
-
### Other changes
|
203
|
-
|
204
|
-
* Updated translations. ([46a89fd](https://github.com/ckeditor/ckeditor5-undo/commit/46a89fd))
|