@ckeditor/ckeditor5-clipboard 43.3.1-alpha.0 → 44.0.0-alpha.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/README.md +11 -5
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/dragdroptarget.js +1 -1
package/README.md
CHANGED
|
@@ -3,20 +3,26 @@ CKEditor 5 clipboard feature
|
|
|
3
3
|
|
|
4
4
|
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-clipboard)
|
|
5
5
|
[](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
|
6
|
-
[](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master)
|
|
7
7
|
|
|
8
8
|
This package implements the clipboard (copy, cut, paste) support for CKEditor 5.
|
|
9
9
|
|
|
10
|
-
## Documentation
|
|
11
|
-
|
|
12
|
-
See the [`@ckeditor/ckeditor5-clipboard` package](https://ckeditor.com/docs/ckeditor5/latest/api/clipboard.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
|
|
13
|
-
|
|
14
10
|
## Installation
|
|
15
11
|
|
|
12
|
+
This plugin is part of the `ckeditor5` package. Install the whole package to use it.
|
|
13
|
+
|
|
16
14
|
```bash
|
|
17
15
|
npm install ckeditor5
|
|
18
16
|
```
|
|
19
17
|
|
|
18
|
+
## Create free account
|
|
19
|
+
|
|
20
|
+
If you want to check full CKEditor 5 capabilities, sign up for a [free non-commitment 14-day trial](https://portal.ckeditor.com/signup).
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
See the [`@ckeditor/ckeditor5-clipboard` package](https://ckeditor.com/docs/ckeditor5/latest/api/clipboard.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
|
|
25
|
+
|
|
20
26
|
## License
|
|
21
27
|
|
|
22
28
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
|
package/dist/index.js
CHANGED
|
@@ -1244,7 +1244,9 @@ const toPx = /* #__PURE__ */ toUnit('px');
|
|
|
1244
1244
|
if (targetViewRanges) {
|
|
1245
1245
|
const targetViewPosition = targetViewRanges[0].start;
|
|
1246
1246
|
const targetModelPosition = mapper.toModelPosition(targetViewPosition);
|
|
1247
|
-
const canDropOnPosition = !draggedRange || Array.from(draggedRange.getItems(
|
|
1247
|
+
const canDropOnPosition = !draggedRange || Array.from(draggedRange.getItems({
|
|
1248
|
+
shallow: true
|
|
1249
|
+
})).every((item)=>model.schema.checkChild(targetModelPosition, item));
|
|
1248
1250
|
if (canDropOnPosition) {
|
|
1249
1251
|
if (model.schema.checkChild(targetModelPosition, '$text')) {
|
|
1250
1252
|
return model.createRange(targetModelPosition);
|