@ckeditor/ckeditor5-paste-from-office 48.2.0 → 48.3.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/dist/augmentation.d.ts +8 -8
- package/dist/filters/bookmark.d.ts +10 -10
- package/dist/filters/br.d.ts +11 -11
- package/dist/filters/image.d.ts +19 -19
- package/dist/filters/list.d.ts +25 -25
- package/dist/filters/parse.d.ts +28 -28
- package/dist/filters/removeboldwrapper.d.ts +11 -11
- package/dist/filters/removegooglesheetstag.d.ts +11 -11
- package/dist/filters/removeinvalidtablewidth.d.ts +11 -11
- package/dist/filters/removemsattributes.d.ts +11 -11
- package/dist/filters/removestyleblock.d.ts +11 -11
- package/dist/filters/removexmlns.d.ts +11 -11
- package/dist/filters/replacemsfootnotes.d.ts +53 -50
- package/dist/filters/replacetabswithinprewithspaces.d.ts +20 -20
- package/dist/filters/space.d.ts +23 -23
- package/dist/filters/table.d.ts +12 -12
- package/dist/filters/utils.d.ts +17 -17
- package/dist/index-content.css +1 -0
- package/dist/index-editor.css +1 -0
- package/dist/index.css +0 -2
- package/dist/index.d.ts +25 -25
- package/dist/index.js +1372 -1663
- package/dist/index.js.map +1 -1
- package/dist/normalizer.d.ts +20 -20
- package/dist/normalizers/googledocsnormalizer.d.ts +27 -27
- package/dist/normalizers/googlesheetsnormalizer.d.ts +27 -27
- package/dist/normalizers/mswordnormalizer.d.ts +28 -28
- package/dist/pastefromoffice.d.ts +54 -54
- package/package.json +5 -5
- package/dist/index.css.map +0 -1
package/dist/normalizer.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { ClipboardInputTransformationData } from
|
|
6
|
+
* @module paste-from-office/normalizer
|
|
7
|
+
*/
|
|
8
|
+
import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
* Interface defining a content transformation pasted from an external editor.
|
|
11
|
+
*
|
|
12
|
+
* Normalizers are registered by the {@link module:paste-from-office/pastefromoffice~PasteFromOffice} plugin and run on
|
|
13
|
+
* {@link module:clipboard/clipboardpipeline~ClipboardPipeline#event:inputTransformation inputTransformation event}.
|
|
14
|
+
* They detect environment-specific quirks and transform it into a form compatible with other CKEditor features.
|
|
15
|
+
*/
|
|
16
16
|
export interface PasteFromOfficeNormalizer {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Must return `true` if the `htmlString` contains content which this normalizer can transform.
|
|
19
|
+
*/
|
|
20
|
+
isActive(htmlString: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Executes the normalization of a given data.
|
|
23
|
+
*/
|
|
24
|
+
execute(data: ClipboardInputTransformationData): void;
|
|
25
25
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { type ViewDocument } from
|
|
9
|
-
import type { ClipboardInputTransformationData } from
|
|
10
|
-
import type { PasteFromOfficeNormalizer } from
|
|
6
|
+
* @module paste-from-office/normalizers/googledocsnormalizer
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewDocument } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
10
|
+
import type { PasteFromOfficeNormalizer } from "../normalizer.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
* Normalizer for the content pasted from Google Docs.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
16
|
export declare class GoogleDocsNormalizer implements PasteFromOfficeNormalizer {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
readonly document: ViewDocument;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new `GoogleDocsNormalizer` instance.
|
|
20
|
+
*
|
|
21
|
+
* @param document View document.
|
|
22
|
+
*/
|
|
23
|
+
constructor(document: ViewDocument);
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
isActive(htmlString: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
execute(data: ClipboardInputTransformationData): void;
|
|
32
32
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { type ViewDocument } from
|
|
9
|
-
import type { ClipboardInputTransformationData } from
|
|
10
|
-
import type { PasteFromOfficeNormalizer } from
|
|
6
|
+
* @module paste-from-office/normalizers/googlesheetsnormalizer
|
|
7
|
+
*/
|
|
8
|
+
import { type ViewDocument } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
10
|
+
import type { PasteFromOfficeNormalizer } from "../normalizer.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
* Normalizer for the content pasted from Google Sheets.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
16
|
export declare class GoogleSheetsNormalizer implements PasteFromOfficeNormalizer {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
readonly document: ViewDocument;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new `GoogleSheetsNormalizer` instance.
|
|
20
|
+
*
|
|
21
|
+
* @param document View document.
|
|
22
|
+
*/
|
|
23
|
+
constructor(document: ViewDocument);
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
isActive(htmlString: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
execute(data: ClipboardInputTransformationData): void;
|
|
32
32
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { ClipboardInputTransformationData } from
|
|
9
|
-
import { type ViewDocument } from
|
|
10
|
-
import type { PasteFromOfficeNormalizer } from
|
|
6
|
+
* @module paste-from-office/normalizers/mswordnormalizer
|
|
7
|
+
*/
|
|
8
|
+
import type { ClipboardInputTransformationData } from "@ckeditor/ckeditor5-clipboard";
|
|
9
|
+
import { type ViewDocument } from "@ckeditor/ckeditor5-engine";
|
|
10
|
+
import type { PasteFromOfficeNormalizer } from "../normalizer.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* Normalizer for the content pasted from Microsoft Word.
|
|
13
|
+
*/
|
|
14
14
|
export declare class PasteFromOfficeMSWordNormalizer implements PasteFromOfficeNormalizer {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
readonly document: ViewDocument;
|
|
16
|
+
readonly hasMultiLevelListPlugin: boolean;
|
|
17
|
+
readonly hasTablePropertiesPlugin: boolean;
|
|
18
|
+
readonly enableSkipLevelLists: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new `PasteFromOfficeMSWordNormalizer` instance.
|
|
21
|
+
*
|
|
22
|
+
* @param document View document.
|
|
23
|
+
*/
|
|
24
|
+
constructor(document: ViewDocument, hasMultiLevelListPlugin?: boolean, hasTablePropertiesPlugin?: boolean, enableSkipLevelLists?: boolean);
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
isActive(htmlString: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
execute(data: ClipboardInputTransformationData): void;
|
|
33
33
|
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { type PriorityString } from
|
|
10
|
-
import { ClipboardPipeline } from
|
|
11
|
-
import type { PasteFromOfficeNormalizer } from
|
|
6
|
+
* @module paste-from-office/pastefromoffice
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { type PriorityString } from "@ckeditor/ckeditor5-utils";
|
|
10
|
+
import { ClipboardPipeline } from "@ckeditor/ckeditor5-clipboard";
|
|
11
|
+
import type { PasteFromOfficeNormalizer } from "./normalizer.js";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
* The Paste from Office plugin.
|
|
14
|
+
*
|
|
15
|
+
* This plugin handles content pasted from Office apps and transforms it (if necessary)
|
|
16
|
+
* to a valid structure which can then be understood by the editor features.
|
|
17
|
+
*
|
|
18
|
+
* Transformation is made by a set of predefined {@link module:paste-from-office/normalizer~PasteFromOfficeNormalizer normalizers}.
|
|
19
|
+
* This plugin includes following normalizers:
|
|
20
|
+
* * {@link module:paste-from-office/normalizers/mswordnormalizer~PasteFromOfficeMSWordNormalizer Microsoft Word normalizer}
|
|
21
|
+
* * {@link module:paste-from-office/normalizers/googledocsnormalizer~GoogleDocsNormalizer Google Docs normalizer}
|
|
22
|
+
*
|
|
23
|
+
* For more information about this feature check the {@glink api/paste-from-office package page}.
|
|
24
|
+
*/
|
|
25
25
|
export declare class PasteFromOffice extends Plugin {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The priority array of registered normalizers.
|
|
28
|
+
*/
|
|
29
|
+
private _normalizers;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get pluginName(): "PasteFromOffice";
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
static get licenseFeatureCode(): string;
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
static override get isOfficialPlugin(): true;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
static override get isPremiumPlugin(): true;
|
|
47
|
+
/**
|
|
48
|
+
* @inheritDoc
|
|
49
|
+
*/
|
|
50
|
+
static get requires(): PluginDependenciesOf<[ClipboardPipeline]>;
|
|
51
|
+
/**
|
|
52
|
+
* @inheritDoc
|
|
53
|
+
*/
|
|
54
|
+
init(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Registers a normalizer with the given priority.
|
|
57
|
+
*/
|
|
58
|
+
registerNormalizer(normalizer: PasteFromOfficeNormalizer, priority?: PriorityString): void;
|
|
59
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-paste-from-office",
|
|
3
|
-
"version": "48.
|
|
3
|
+
"version": "48.3.0-alpha.0",
|
|
4
4
|
"description": "Paste from Office feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ckeditor/ckeditor5-clipboard": "48.
|
|
30
|
-
"@ckeditor/ckeditor5-core": "48.
|
|
31
|
-
"@ckeditor/ckeditor5-engine": "48.
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "48.
|
|
29
|
+
"@ckeditor/ckeditor5-clipboard": "48.3.0-alpha.0",
|
|
30
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.0",
|
|
31
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.0"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
package/dist/index.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index.css.map */"]}
|