@ckeditor/ckeditor5-clipboard 40.1.0 → 41.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -25
- package/LICENSE.md +1 -1
- package/package.json +7 -6
- package/src/augmentation.d.ts +2 -2
- package/src/augmentation.js +1 -1
- package/src/clipboard.d.ts +4 -4
- package/src/clipboard.js +4 -4
- package/src/clipboardobserver.d.ts +3 -3
- package/src/clipboardobserver.js +1 -1
- package/src/clipboardpipeline.d.ts +1 -1
- package/src/clipboardpipeline.js +5 -5
- package/src/dragdrop.d.ts +4 -4
- package/src/dragdrop.js +5 -5
- package/src/dragdropblocktoolbar.d.ts +1 -1
- package/src/dragdropblocktoolbar.js +2 -2
- package/src/dragdroptarget.d.ts +1 -1
- package/src/dragdroptarget.js +11 -5
- package/src/index.d.ts +10 -10
- package/src/index.js +8 -8
- package/src/lineview.d.ts +1 -1
- package/src/lineview.js +1 -1
- package/src/pasteplaintext.d.ts +2 -2
- package/src/pasteplaintext.js +3 -3
- package/src/utils/normalizeclipboarddata.d.ts +1 -1
- package/src/utils/normalizeclipboarddata.js +1 -1
- package/src/utils/plaintexttohtml.d.ts +1 -1
- package/src/utils/plaintexttohtml.js +1 -1
- package/src/utils/viewtoplaintext.d.ts +1 -1
- package/src/utils/viewtoplaintext.js +1 -1
- package/theme/clipboard.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,46 +5,46 @@ All changes in the package are documented in the main repository. See: https://g
|
|
|
5
5
|
|
|
6
6
|
Changes for the past releases are available below.
|
|
7
7
|
|
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v18.0.0...v19.0.0) (2020
|
|
8
|
+
## [19.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v18.0.0...v19.0.0) (April 29, 2020)
|
|
9
9
|
|
|
10
10
|
### Other changes
|
|
11
11
|
|
|
12
12
|
* Handled `paste` and `drop` events no longer propagate up the DOM tree. Closes [ckeditor/ckeditor5#6464](https://github.com/ckeditor/ckeditor5/issues/6464). ([70aa7ba](https://github.com/ckeditor/ckeditor5-clipboard/commit/70aa7ba))
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v17.0.0...v18.0.0) (2020
|
|
15
|
+
## [18.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v17.0.0...v18.0.0) (March 19, 2020)
|
|
16
16
|
|
|
17
17
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v16.0.0...v17.0.0) (2020
|
|
20
|
+
## [17.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v16.0.0...v17.0.0) (February 19, 2020)
|
|
21
21
|
|
|
22
22
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v15.0.0...v16.0.0) (2019
|
|
25
|
+
## [16.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v15.0.0...v16.0.0) (December 4, 2019)
|
|
26
26
|
|
|
27
27
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
## [15.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v12.0.2...v15.0.0) (2019
|
|
30
|
+
## [15.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v12.0.2...v15.0.0) (October 23, 2019)
|
|
31
31
|
|
|
32
32
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
## [12.0.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v12.0.1...v12.0.2) (2019
|
|
35
|
+
## [12.0.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v12.0.1...v12.0.2) (August 26, 2019)
|
|
36
36
|
|
|
37
37
|
### Other changes
|
|
38
38
|
|
|
39
39
|
* 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). ([b1782bb](https://github.com/ckeditor/ckeditor5-clipboard/commit/b1782bb))
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
## [12.0.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v12.0.0...v12.0.1) (2019
|
|
42
|
+
## [12.0.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v12.0.0...v12.0.1) (July 10, 2019)
|
|
43
43
|
|
|
44
44
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
## [12.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v11.0.2...v12.0.0) (2019
|
|
47
|
+
## [12.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v11.0.2...v12.0.0) (July 4, 2019)
|
|
48
48
|
|
|
49
49
|
### Other changes
|
|
50
50
|
|
|
@@ -55,43 +55,43 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
55
55
|
* From now on, every new line pasted in the editor as a plain text, will create a new paragraph. Read more at [ckeditor/ckeditor5#1727](https://github.com/ckeditor/ckeditor5/issues/1727).
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
## [11.0.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v11.0.1...v11.0.2) (2019
|
|
58
|
+
## [11.0.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v11.0.1...v11.0.2) (June 6, 2019)
|
|
59
59
|
|
|
60
60
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
## [11.0.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v11.0.0...v11.0.1) (2019
|
|
63
|
+
## [11.0.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v11.0.0...v11.0.1) (April 4, 2019)
|
|
64
64
|
|
|
65
65
|
### Bug fixes
|
|
66
66
|
|
|
67
67
|
* The DOM `drop` event will not bubble up if the `clipboardInput` event was handled. Closes [ckeditor/ckeditor5-upload#92](https://github.com/ckeditor/ckeditor5-upload/issues/92). ([5d14697](https://github.com/ckeditor/ckeditor5-clipboard/commit/5d14697))
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
## [11.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.4...v11.0.0) (2019
|
|
70
|
+
## [11.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.4...v11.0.0) (February 28, 2019)
|
|
71
71
|
|
|
72
72
|
### BREAKING CHANGES
|
|
73
73
|
|
|
74
74
|
* 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))
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
## [10.0.4](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.3...v10.0.4) (2018
|
|
77
|
+
## [10.0.4](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.3...v10.0.4) (December 5, 2018)
|
|
78
78
|
|
|
79
79
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
## [10.0.3](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.2...v10.0.3) (2018
|
|
82
|
+
## [10.0.3](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.2...v10.0.3) (October 8, 2018)
|
|
83
83
|
|
|
84
84
|
### Other changes
|
|
85
85
|
|
|
86
86
|
* The `Clipboard#inputTransformation` event is now emitted with an additional `dataTransfer` object. Closes [#54](https://github.com/ckeditor/ckeditor5-clipboard/issues/54) . ([f3589b4](https://github.com/ckeditor/ckeditor5-clipboard/commit/f3589b4))
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
## [10.0.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.1...v10.0.2) (2018
|
|
89
|
+
## [10.0.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.1...v10.0.2) (July 18, 2018)
|
|
90
90
|
|
|
91
91
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
## [10.0.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.0...v10.0.1) (2018
|
|
94
|
+
## [10.0.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v10.0.0...v10.0.1) (June 21, 2018)
|
|
95
95
|
|
|
96
96
|
### Bug fixes
|
|
97
97
|
|
|
@@ -99,7 +99,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
99
99
|
* When pasting a plain text, single new line characters should be converted to `<br>`s. Closes [ckeditor/ckeditor5#766](https://github.com/ckeditor/ckeditor5/issues/766). ([be21676](https://github.com/ckeditor/ckeditor5-clipboard/commit/be21676))
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
## [10.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-beta.4...v10.0.0) (2018
|
|
102
|
+
## [10.0.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-beta.4...v10.0.0) (April 25, 2018)
|
|
103
103
|
|
|
104
104
|
### Other changes
|
|
105
105
|
|
|
@@ -110,32 +110,32 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
110
110
|
* 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.
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018
|
|
113
|
+
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-beta.2...v1.0.0-beta.4) (April 19, 2018)
|
|
114
114
|
|
|
115
115
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018
|
|
118
|
+
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-beta.1...v1.0.0-beta.2) (April 10, 2018)
|
|
119
119
|
|
|
120
120
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018
|
|
123
|
+
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (March 15, 2018)
|
|
124
124
|
|
|
125
125
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017
|
|
128
|
+
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-clipboard/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (November 14, 2017)
|
|
129
129
|
|
|
130
130
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.7.0...v1.0.0-alpha.1) (2017
|
|
133
|
+
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.7.0...v1.0.0-alpha.1) (October 3, 2017)
|
|
134
134
|
|
|
135
135
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
## [0.7.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.6.0...v0.7.0) (2017
|
|
138
|
+
## [0.7.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.6.0...v0.7.0) (September 3, 2017)
|
|
139
139
|
|
|
140
140
|
### Bug fixes
|
|
141
141
|
|
|
@@ -149,7 +149,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
149
149
|
* The viewport will be scrolled to the selection on paste. See ckeditor/ckeditor5-engine#660. ([9a0e20f](https://github.com/ckeditor/ckeditor5-clipboard/commit/9a0e20f))
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
## [0.6.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.5.0...v0.6.0) (2017
|
|
152
|
+
## [0.6.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.5.0...v0.6.0) (May 7, 2017)
|
|
153
153
|
|
|
154
154
|
### Bug fixes
|
|
155
155
|
|
|
@@ -164,7 +164,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
164
164
|
* The `clipboardInput` event now contains only the `dataTransfer` property (`content` was removed). The separate `inputTransformation` event was introduced for the content transformations.
|
|
165
165
|
|
|
166
166
|
|
|
167
|
-
## [0.5.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.4.1...v0.5.0) (2017
|
|
167
|
+
## [0.5.0](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.4.1...v0.5.0) (April 5, 2017)
|
|
168
168
|
|
|
169
169
|
### Other changes
|
|
170
170
|
|
|
@@ -175,6 +175,6 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
175
175
|
* Named existing plugin(s). ([3d37f53](https://github.com/ckeditor/ckeditor5-clipboard/commit/3d37f53))
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
## [0.4.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.4.0...v0.4.1) (2017
|
|
178
|
+
## [0.4.1](https://github.com/ckeditor/ckeditor5-clipboard/compare/v0.4.0...v0.4.1) (March 6, 2017)
|
|
179
179
|
|
|
180
180
|
Internal changes only (updated dependencies, documentation, etc.).
|
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 clipboard feature** – https://github.com/ckeditor/ckeditor5-clipboard <br>
|
|
5
|
-
Copyright (c) 2003–
|
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) 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).
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-clipboard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"description": "Clipboard integration feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
"ckeditor5-plugin",
|
|
11
11
|
"ckeditor5-dll"
|
|
12
12
|
],
|
|
13
|
+
"type": "module",
|
|
13
14
|
"main": "src/index.js",
|
|
14
15
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-core": "
|
|
16
|
-
"@ckeditor/ckeditor5-engine": "
|
|
17
|
-
"@ckeditor/ckeditor5-ui": "
|
|
18
|
-
"@ckeditor/ckeditor5-utils": "
|
|
19
|
-
"@ckeditor/ckeditor5-widget": "
|
|
16
|
+
"@ckeditor/ckeditor5-core": "41.0.0",
|
|
17
|
+
"@ckeditor/ckeditor5-engine": "41.0.0",
|
|
18
|
+
"@ckeditor/ckeditor5-ui": "41.0.0",
|
|
19
|
+
"@ckeditor/ckeditor5-utils": "41.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-widget": "41.0.0",
|
|
20
21
|
"lodash-es": "4.17.21"
|
|
21
22
|
},
|
|
22
23
|
"author": "CKSource (http://cksource.com/)",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { Clipboard, ClipboardPipeline, PastePlainText, DragDrop, DragDropTarget, DragDropBlockToolbar } from './index';
|
|
5
|
+
import type { Clipboard, ClipboardPipeline, PastePlainText, DragDrop, DragDropTarget, DragDropBlockToolbar } from './index.js';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface PluginsMap {
|
|
8
8
|
[Clipboard.pluginName]: Clipboard;
|
package/src/augmentation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
export {};
|
package/src/clipboard.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/clipboard
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
|
-
import ClipboardPipeline from './clipboardpipeline';
|
|
10
|
-
import DragDrop from './dragdrop';
|
|
11
|
-
import PastePlainText from './pasteplaintext';
|
|
9
|
+
import ClipboardPipeline from './clipboardpipeline.js';
|
|
10
|
+
import DragDrop from './dragdrop.js';
|
|
11
|
+
import PastePlainText from './pasteplaintext.js';
|
|
12
12
|
/**
|
|
13
13
|
* The clipboard feature.
|
|
14
14
|
*
|
package/src/clipboard.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/clipboard
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
|
-
import ClipboardPipeline from './clipboardpipeline';
|
|
10
|
-
import DragDrop from './dragdrop';
|
|
11
|
-
import PastePlainText from './pasteplaintext';
|
|
9
|
+
import ClipboardPipeline from './clipboardpipeline.js';
|
|
10
|
+
import DragDrop from './dragdrop.js';
|
|
11
|
+
import PastePlainText from './pasteplaintext.js';
|
|
12
12
|
/**
|
|
13
13
|
* The clipboard feature.
|
|
14
14
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { DataTransfer, DomEventObserver, type DomEventData, type
|
|
5
|
+
import { DataTransfer, DomEventObserver, type DomEventData, type EditingView, type ViewDocumentFragment, type ViewElement, type ViewRange } from '@ckeditor/ckeditor5-engine';
|
|
6
6
|
/**
|
|
7
7
|
* Clipboard events observer.
|
|
8
8
|
*
|
|
@@ -27,7 +27,7 @@ import { DataTransfer, DomEventObserver, type DomEventData, type View, type View
|
|
|
27
27
|
*/
|
|
28
28
|
export default class ClipboardObserver extends DomEventObserver<'paste' | 'copy' | 'cut' | 'drop' | 'dragover' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave', ClipboardEventData> {
|
|
29
29
|
readonly domEventType: readonly ["paste", "copy", "cut", "drop", "dragover", "dragstart", "dragend", "dragenter", "dragleave"];
|
|
30
|
-
constructor(view:
|
|
30
|
+
constructor(view: EditingView);
|
|
31
31
|
onDomEvent(domEvent: ClipboardEvent | DragEvent): void;
|
|
32
32
|
}
|
|
33
33
|
/**
|
package/src/clipboardobserver.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/clipboardpipeline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import { EventInfo } from '@ckeditor/ckeditor5-utils';
|
|
10
|
-
import ClipboardObserver from './clipboardobserver';
|
|
11
|
-
import plainTextToHtml from './utils/plaintexttohtml';
|
|
12
|
-
import normalizeClipboardHtml from './utils/normalizeclipboarddata';
|
|
13
|
-
import viewToPlainText from './utils/viewtoplaintext';
|
|
10
|
+
import ClipboardObserver from './clipboardobserver.js';
|
|
11
|
+
import plainTextToHtml from './utils/plaintexttohtml.js';
|
|
12
|
+
import normalizeClipboardHtml from './utils/normalizeclipboarddata.js';
|
|
13
|
+
import viewToPlainText from './utils/viewtoplaintext.js';
|
|
14
14
|
// Input pipeline events overview:
|
|
15
15
|
//
|
|
16
16
|
// ┌──────────────────────┐ ┌──────────────────────┐
|
package/src/dragdrop.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import { Widget } from '@ckeditor/ckeditor5-widget';
|
|
10
|
-
import ClipboardPipeline from './clipboardpipeline';
|
|
11
|
-
import DragDropTarget from './dragdroptarget';
|
|
12
|
-
import DragDropBlockToolbar from './dragdropblocktoolbar';
|
|
10
|
+
import ClipboardPipeline from './clipboardpipeline.js';
|
|
11
|
+
import DragDropTarget from './dragdroptarget.js';
|
|
12
|
+
import DragDropBlockToolbar from './dragdropblocktoolbar.js';
|
|
13
13
|
import '../theme/clipboard.css';
|
|
14
14
|
/**
|
|
15
15
|
* The drag and drop feature. It works on top of the {@link module:clipboard/clipboardpipeline~ClipboardPipeline}.
|
package/src/dragdrop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -9,10 +9,10 @@ import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
|
9
9
|
import { LiveRange, MouseObserver } from '@ckeditor/ckeditor5-engine';
|
|
10
10
|
import { Widget, isWidget } from '@ckeditor/ckeditor5-widget';
|
|
11
11
|
import { env, uid, global, createElement, DomEmitterMixin, delay, Rect } from '@ckeditor/ckeditor5-utils';
|
|
12
|
-
import ClipboardPipeline from './clipboardpipeline';
|
|
13
|
-
import ClipboardObserver from './clipboardobserver';
|
|
14
|
-
import DragDropTarget from './dragdroptarget';
|
|
15
|
-
import DragDropBlockToolbar from './dragdropblocktoolbar';
|
|
12
|
+
import ClipboardPipeline from './clipboardpipeline.js';
|
|
13
|
+
import ClipboardObserver from './clipboardobserver.js';
|
|
14
|
+
import DragDropTarget from './dragdroptarget.js';
|
|
15
|
+
import DragDropBlockToolbar from './dragdropblocktoolbar.js';
|
|
16
16
|
import '../theme/clipboard.css';
|
|
17
17
|
// Drag and drop events overview:
|
|
18
18
|
//
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import { env, global, DomEmitterMixin } from '@ckeditor/ckeditor5-utils';
|
|
10
|
-
import ClipboardObserver from './clipboardobserver';
|
|
10
|
+
import ClipboardObserver from './clipboardobserver.js';
|
|
11
11
|
/**
|
|
12
12
|
* Integration of a block Drag and Drop support with the block toolbar.
|
|
13
13
|
*
|
package/src/dragdroptarget.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/dragdroptarget.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import { global, Rect, DomEmitterMixin, delay, ResizeObserver } from '@ckeditor/ckeditor5-utils';
|
|
10
|
-
import LineView from './lineview';
|
|
10
|
+
import LineView from './lineview.js';
|
|
11
11
|
import { throttle } from 'lodash-es';
|
|
12
12
|
/**
|
|
13
13
|
* Part of the Drag and Drop handling. Responsible for finding and displaying the drop target.
|
|
@@ -200,6 +200,9 @@ export default class DragDropTarget extends Plugin {
|
|
|
200
200
|
const viewElementAfter = nodeAfter ? editing.mapper.toViewElement(nodeAfter) : null;
|
|
201
201
|
const domElementAfter = viewElementAfter ? editing.view.domConverter.mapViewToDom(viewElementAfter) : null;
|
|
202
202
|
const viewElementParent = editing.mapper.toViewElement(nodeParent);
|
|
203
|
+
if (!viewElementParent) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
203
206
|
const domElementParent = editing.view.domConverter.mapViewToDom(viewElementParent);
|
|
204
207
|
const domScrollableRect = this._getScrollableRect(viewElementParent);
|
|
205
208
|
const { scrollX, scrollY } = global.window;
|
|
@@ -285,7 +288,7 @@ function findDropTargetRange(editor, targetViewElement, targetViewRanges, client
|
|
|
285
288
|
}
|
|
286
289
|
else if (model.schema.checkChild(modelElement, '$block')) {
|
|
287
290
|
const childNodes = Array.from(modelElement.getChildren())
|
|
288
|
-
.filter((node) => node.is('element') && !
|
|
291
|
+
.filter((node) => node.is('element') && !shouldIgnoreElement(editor, node));
|
|
289
292
|
let startIndex = 0;
|
|
290
293
|
let endIndex = childNodes.length;
|
|
291
294
|
if (endIndex == 0) {
|
|
@@ -308,12 +311,15 @@ function findDropTargetRange(editor, targetViewElement, targetViewRanges, client
|
|
|
308
311
|
return null;
|
|
309
312
|
}
|
|
310
313
|
/**
|
|
311
|
-
* Returns true for elements
|
|
314
|
+
* Returns true for elements which should be ignored.
|
|
312
315
|
*/
|
|
313
|
-
function
|
|
316
|
+
function shouldIgnoreElement(editor, modelElement) {
|
|
314
317
|
const mapper = editor.editing.mapper;
|
|
315
318
|
const domConverter = editor.editing.view.domConverter;
|
|
316
319
|
const viewElement = mapper.toViewElement(modelElement);
|
|
320
|
+
if (!viewElement) {
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
317
323
|
const domElement = domConverter.mapViewToDom(viewElement);
|
|
318
324
|
return global.window.getComputedStyle(domElement).float != 'none';
|
|
319
325
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard
|
|
7
7
|
*/
|
|
8
|
-
export { default as Clipboard } from './clipboard';
|
|
9
|
-
export { default as ClipboardPipeline, type ClipboardContentInsertionEvent, type ClipboardInputTransformationEvent, type ClipboardInputTransformationData, type ClipboardOutputTransformationEvent, type ClipboardOutputTransformationData, type ViewDocumentClipboardOutputEvent } from './clipboardpipeline';
|
|
10
|
-
export type { ClipboardEventData } from './clipboardobserver';
|
|
11
|
-
export { default as DragDrop } from './dragdrop';
|
|
12
|
-
export { default as PastePlainText } from './pasteplaintext';
|
|
13
|
-
export { default as DragDropTarget } from './dragdroptarget';
|
|
14
|
-
export { default as DragDropBlockToolbar } from './dragdropblocktoolbar';
|
|
15
|
-
export type { ViewDocumentClipboardInputEvent, ViewDocumentCopyEvent, ViewDocumentCutEvent } from './clipboardobserver';
|
|
16
|
-
import './augmentation';
|
|
8
|
+
export { default as Clipboard } from './clipboard.js';
|
|
9
|
+
export { default as ClipboardPipeline, type ClipboardContentInsertionEvent, type ClipboardInputTransformationEvent, type ClipboardInputTransformationData, type ClipboardOutputTransformationEvent, type ClipboardOutputTransformationData, type ViewDocumentClipboardOutputEvent } from './clipboardpipeline.js';
|
|
10
|
+
export type { ClipboardEventData } from './clipboardobserver.js';
|
|
11
|
+
export { default as DragDrop } from './dragdrop.js';
|
|
12
|
+
export { default as PastePlainText } from './pasteplaintext.js';
|
|
13
|
+
export { default as DragDropTarget } from './dragdroptarget.js';
|
|
14
|
+
export { default as DragDropBlockToolbar } from './dragdropblocktoolbar.js';
|
|
15
|
+
export type { ViewDocumentClipboardInputEvent, ViewDocumentCopyEvent, ViewDocumentCutEvent } from './clipboardobserver.js';
|
|
16
|
+
import './augmentation.js';
|
package/src/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard
|
|
7
7
|
*/
|
|
8
|
-
export { default as Clipboard } from './clipboard';
|
|
9
|
-
export { default as ClipboardPipeline } from './clipboardpipeline';
|
|
10
|
-
export { default as DragDrop } from './dragdrop';
|
|
11
|
-
export { default as PastePlainText } from './pasteplaintext';
|
|
12
|
-
export { default as DragDropTarget } from './dragdroptarget';
|
|
13
|
-
export { default as DragDropBlockToolbar } from './dragdropblocktoolbar';
|
|
14
|
-
import './augmentation';
|
|
8
|
+
export { default as Clipboard } from './clipboard.js';
|
|
9
|
+
export { default as ClipboardPipeline } from './clipboardpipeline.js';
|
|
10
|
+
export { default as DragDrop } from './dragdrop.js';
|
|
11
|
+
export { default as PastePlainText } from './pasteplaintext.js';
|
|
12
|
+
export { default as DragDropTarget } from './dragdroptarget.js';
|
|
13
|
+
export { default as DragDropBlockToolbar } from './dragdropblocktoolbar.js';
|
|
14
|
+
import './augmentation.js';
|
package/src/lineview.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/lineview.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
package/src/pasteplaintext.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/pasteplaintext
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
|
-
import ClipboardPipeline from './clipboardpipeline';
|
|
9
|
+
import ClipboardPipeline from './clipboardpipeline.js';
|
|
10
10
|
/**
|
|
11
11
|
* The plugin detects the user's intention to paste plain text.
|
|
12
12
|
*
|
package/src/pasteplaintext.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/pasteplaintext
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
|
-
import ClipboardObserver from './clipboardobserver';
|
|
10
|
-
import ClipboardPipeline from './clipboardpipeline';
|
|
9
|
+
import ClipboardObserver from './clipboardobserver.js';
|
|
10
|
+
import ClipboardPipeline from './clipboardpipeline.js';
|
|
11
11
|
/**
|
|
12
12
|
* The plugin detects the user's intention to paste plain text.
|
|
13
13
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
// Elements which should not have empty-line padding.
|
package/theme/clipboard.css
CHANGED