@ckeditor/ckeditor5-clipboard 35.3.2 → 35.4.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/package.json +22 -22
- package/src/clipboard.js +2 -2
- package/src/clipboardobserver.js +2 -3
- package/src/clipboardpipeline.js +3 -3
- package/src/dragdrop.js +5 -8
- package/src/pasteplaintext.js +1 -1
- package/src/utils/plaintexttohtml.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-clipboard",
|
|
3
|
-
"version": "35.
|
|
3
|
+
"version": "35.4.0",
|
|
4
4
|
"description": "Clipboard integration feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,30 +12,30 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-core": "^35.
|
|
16
|
-
"@ckeditor/ckeditor5-engine": "^35.
|
|
17
|
-
"@ckeditor/ckeditor5-utils": "^35.
|
|
18
|
-
"@ckeditor/ckeditor5-widget": "^35.
|
|
15
|
+
"@ckeditor/ckeditor5-core": "^35.4.0",
|
|
16
|
+
"@ckeditor/ckeditor5-engine": "^35.4.0",
|
|
17
|
+
"@ckeditor/ckeditor5-utils": "^35.4.0",
|
|
18
|
+
"@ckeditor/ckeditor5-widget": "^35.4.0",
|
|
19
19
|
"lodash-es": "^4.17.11"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@ckeditor/ckeditor5-alignment": "^35.
|
|
23
|
-
"@ckeditor/ckeditor5-basic-styles": "^35.
|
|
24
|
-
"@ckeditor/ckeditor5-block-quote": "^35.
|
|
25
|
-
"@ckeditor/ckeditor5-cloud-services": "^35.
|
|
26
|
-
"@ckeditor/ckeditor5-code-block": "^35.
|
|
27
|
-
"@ckeditor/ckeditor5-easy-image": "^35.
|
|
28
|
-
"@ckeditor/ckeditor5-editor-classic": "^35.
|
|
29
|
-
"@ckeditor/ckeditor5-enter": "^35.
|
|
30
|
-
"@ckeditor/ckeditor5-horizontal-line": "^35.
|
|
31
|
-
"@ckeditor/ckeditor5-image": "^35.
|
|
32
|
-
"@ckeditor/ckeditor5-link": "^35.
|
|
33
|
-
"@ckeditor/ckeditor5-page-break": "^35.
|
|
34
|
-
"@ckeditor/ckeditor5-paragraph": "^35.
|
|
35
|
-
"@ckeditor/ckeditor5-paste-from-office": "^35.
|
|
36
|
-
"@ckeditor/ckeditor5-remove-format": "^35.
|
|
37
|
-
"@ckeditor/ckeditor5-table": "^35.
|
|
38
|
-
"@ckeditor/ckeditor5-typing": "^35.
|
|
22
|
+
"@ckeditor/ckeditor5-alignment": "^35.4.0",
|
|
23
|
+
"@ckeditor/ckeditor5-basic-styles": "^35.4.0",
|
|
24
|
+
"@ckeditor/ckeditor5-block-quote": "^35.4.0",
|
|
25
|
+
"@ckeditor/ckeditor5-cloud-services": "^35.4.0",
|
|
26
|
+
"@ckeditor/ckeditor5-code-block": "^35.4.0",
|
|
27
|
+
"@ckeditor/ckeditor5-easy-image": "^35.4.0",
|
|
28
|
+
"@ckeditor/ckeditor5-editor-classic": "^35.4.0",
|
|
29
|
+
"@ckeditor/ckeditor5-enter": "^35.4.0",
|
|
30
|
+
"@ckeditor/ckeditor5-horizontal-line": "^35.4.0",
|
|
31
|
+
"@ckeditor/ckeditor5-image": "^35.4.0",
|
|
32
|
+
"@ckeditor/ckeditor5-link": "^35.4.0",
|
|
33
|
+
"@ckeditor/ckeditor5-page-break": "^35.4.0",
|
|
34
|
+
"@ckeditor/ckeditor5-paragraph": "^35.4.0",
|
|
35
|
+
"@ckeditor/ckeditor5-paste-from-office": "^35.4.0",
|
|
36
|
+
"@ckeditor/ckeditor5-remove-format": "^35.4.0",
|
|
37
|
+
"@ckeditor/ckeditor5-table": "^35.4.0",
|
|
38
|
+
"@ckeditor/ckeditor5-typing": "^35.4.0",
|
|
39
39
|
"typescript": "^4.8.4",
|
|
40
40
|
"webpack": "^5.58.1",
|
|
41
41
|
"webpack-cli": "^4.9.0"
|
package/src/clipboard.js
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/clipboard
|
|
7
7
|
*/
|
|
8
|
-
import Plugin from '@ckeditor/ckeditor5-core
|
|
8
|
+
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import ClipboardPipeline from './clipboardpipeline';
|
|
10
10
|
import DragDrop from './dragdrop';
|
|
11
11
|
import PastePlainText from './pasteplaintext';
|
|
12
12
|
/**
|
|
13
13
|
* The clipboard feature.
|
|
14
14
|
*
|
|
15
|
-
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep
|
|
15
|
+
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep-dive guide}.
|
|
16
16
|
*
|
|
17
17
|
* This is a "glue" plugin which loads the following plugins:
|
|
18
18
|
* * {@link module:clipboard/clipboardpipeline~ClipboardPipeline}
|
package/src/clipboardobserver.js
CHANGED
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/clipboardobserver
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import DataTransfer from '@ckeditor/ckeditor5-engine/src/view/datatransfer';
|
|
8
|
+
import { EventInfo } from '@ckeditor/ckeditor5-utils';
|
|
9
|
+
import { DataTransfer, DomEventObserver } from '@ckeditor/ckeditor5-engine';
|
|
11
10
|
/**
|
|
12
11
|
* Clipboard events observer.
|
|
13
12
|
*
|
package/src/clipboardpipeline.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/clipboardpipeline
|
|
7
7
|
*/
|
|
8
|
-
import Plugin from '@ckeditor/ckeditor5-core
|
|
9
|
-
import EventInfo from '@ckeditor/ckeditor5-utils
|
|
8
|
+
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
|
+
import { EventInfo } from '@ckeditor/ckeditor5-utils';
|
|
10
10
|
import ClipboardObserver from './clipboardobserver';
|
|
11
11
|
import plainTextToHtml from './utils/plaintexttohtml';
|
|
12
12
|
import normalizeClipboardHtml from './utils/normalizeclipboarddata';
|
|
@@ -109,7 +109,7 @@ import viewToPlainText from './utils/viewtoplaintext';
|
|
|
109
109
|
* 3. For the `cut` method, calls {@link module:engine/model/model~Model#deleteContent `model.deleteContent()`}
|
|
110
110
|
* on the current selection.
|
|
111
111
|
*
|
|
112
|
-
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep
|
|
112
|
+
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep-dive guide}.
|
|
113
113
|
*
|
|
114
114
|
* @extends module:core/plugin~Plugin
|
|
115
115
|
*/
|
package/src/dragdrop.js
CHANGED
|
@@ -6,13 +6,10 @@
|
|
|
6
6
|
* @module clipboard/dragdrop
|
|
7
7
|
*/
|
|
8
8
|
/* globals setTimeout, clearTimeout */
|
|
9
|
-
import Plugin from '@ckeditor/ckeditor5-core
|
|
10
|
-
import LiveRange from '@ckeditor/ckeditor5-engine
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import uid from '@ckeditor/ckeditor5-utils/src/uid';
|
|
14
|
-
import env from '@ckeditor/ckeditor5-utils/src/env';
|
|
15
|
-
import { isWidget } from '@ckeditor/ckeditor5-widget/src/utils';
|
|
9
|
+
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
10
|
+
import { LiveRange, MouseObserver } from '@ckeditor/ckeditor5-engine';
|
|
11
|
+
import { Widget, isWidget } from '@ckeditor/ckeditor5-widget';
|
|
12
|
+
import { env, uid } from '@ckeditor/ckeditor5-utils';
|
|
16
13
|
import ClipboardPipeline from './clipboardpipeline';
|
|
17
14
|
import ClipboardObserver from './clipboardobserver';
|
|
18
15
|
import { throttle } from 'lodash-es';
|
|
@@ -97,7 +94,7 @@ import '../theme/clipboard.css';
|
|
|
97
94
|
/**
|
|
98
95
|
* The drag and drop feature. It works on top of the {@link module:clipboard/clipboardpipeline~ClipboardPipeline}.
|
|
99
96
|
*
|
|
100
|
-
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep
|
|
97
|
+
* Read more about the clipboard integration in the {@glink framework/guides/deep-dive/clipboard clipboard deep-dive guide}.
|
|
101
98
|
*
|
|
102
99
|
* @extends module:core/plugin~Plugin
|
|
103
100
|
*/
|
package/src/pasteplaintext.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module clipboard/pasteplaintext
|
|
7
7
|
*/
|
|
8
|
-
import Plugin from '@ckeditor/ckeditor5-core
|
|
8
|
+
import { Plugin } from '@ckeditor/ckeditor5-core';
|
|
9
9
|
import ClipboardObserver from './clipboardobserver';
|
|
10
10
|
import ClipboardPipeline from './clipboardpipeline';
|
|
11
11
|
/**
|
|
@@ -20,6 +20,8 @@ export default function plainTextToHtml(text) {
|
|
|
20
20
|
.replace(/\r?\n\r?\n/g, '</p><p>')
|
|
21
21
|
// Creates a line break for each single line break.
|
|
22
22
|
.replace(/\r?\n/g, '<br>')
|
|
23
|
+
// Replace tabs with four spaces.
|
|
24
|
+
.replace(/\t/g, ' ')
|
|
23
25
|
// Preserve trailing spaces (only the first and last one – the rest is handled below).
|
|
24
26
|
.replace(/^\s/, ' ')
|
|
25
27
|
.replace(/\s$/, ' ')
|