@ckeditor/ckeditor5-paste-from-office 48.1.1 → 48.2.0-alpha.1

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.
@@ -6,7 +6,6 @@
6
6
  * @module paste-from-office/normalizer
7
7
  */
8
8
  import type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';
9
- import type { PasteOfficeHtmlParseResult } from './filters/parse.js';
10
9
  /**
11
10
  * Interface defining a content transformation pasted from an external editor.
12
11
  *
@@ -22,9 +21,5 @@ export interface PasteFromOfficeNormalizer {
22
21
  /**
23
22
  * Executes the normalization of a given data.
24
23
  */
25
- execute(data: PasteFromOfficeNormalizerData): void;
26
- }
27
- export interface PasteFromOfficeNormalizerData extends ClipboardInputTransformationData {
28
- _isTransformedWithPasteFromOffice?: boolean;
29
- _parsedData: PasteOfficeHtmlParseResult;
24
+ execute(data: ClipboardInputTransformationData): void;
30
25
  }
@@ -6,7 +6,8 @@
6
6
  * @module paste-from-office/normalizers/googledocsnormalizer
7
7
  */
8
8
  import { type ViewDocument } from '@ckeditor/ckeditor5-engine';
9
- import type { PasteFromOfficeNormalizer, PasteFromOfficeNormalizerData } from '../normalizer.js';
9
+ import type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';
10
+ import type { PasteFromOfficeNormalizer } from '../normalizer.js';
10
11
  /**
11
12
  * Normalizer for the content pasted from Google Docs.
12
13
  *
@@ -27,5 +28,5 @@ export declare class GoogleDocsNormalizer implements PasteFromOfficeNormalizer {
27
28
  /**
28
29
  * @inheritDoc
29
30
  */
30
- execute(data: PasteFromOfficeNormalizerData): void;
31
+ execute(data: ClipboardInputTransformationData): void;
31
32
  }
@@ -6,7 +6,8 @@
6
6
  * @module paste-from-office/normalizers/googlesheetsnormalizer
7
7
  */
8
8
  import { type ViewDocument } from '@ckeditor/ckeditor5-engine';
9
- import type { PasteFromOfficeNormalizer, PasteFromOfficeNormalizerData } from '../normalizer.js';
9
+ import type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';
10
+ import type { PasteFromOfficeNormalizer } from '../normalizer.js';
10
11
  /**
11
12
  * Normalizer for the content pasted from Google Sheets.
12
13
  *
@@ -27,5 +28,5 @@ export declare class GoogleSheetsNormalizer implements PasteFromOfficeNormalizer
27
28
  /**
28
29
  * @inheritDoc
29
30
  */
30
- execute(data: PasteFromOfficeNormalizerData): void;
31
+ execute(data: ClipboardInputTransformationData): void;
31
32
  }
@@ -2,8 +2,12 @@
2
2
  * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
+ /**
6
+ * @module paste-from-office/normalizers/mswordnormalizer
7
+ */
8
+ import type { ClipboardInputTransformationData } from '@ckeditor/ckeditor5-clipboard';
5
9
  import { type ViewDocument } from '@ckeditor/ckeditor5-engine';
6
- import type { PasteFromOfficeNormalizer, PasteFromOfficeNormalizerData } from '../normalizer.js';
10
+ import type { PasteFromOfficeNormalizer } from '../normalizer.js';
7
11
  /**
8
12
  * Normalizer for the content pasted from Microsoft Word.
9
13
  */
@@ -11,12 +15,13 @@ export declare class PasteFromOfficeMSWordNormalizer implements PasteFromOfficeN
11
15
  readonly document: ViewDocument;
12
16
  readonly hasMultiLevelListPlugin: boolean;
13
17
  readonly hasTablePropertiesPlugin: boolean;
18
+ readonly enableSkipLevelLists: boolean;
14
19
  /**
15
20
  * Creates a new `PasteFromOfficeMSWordNormalizer` instance.
16
21
  *
17
22
  * @param document View document.
18
23
  */
19
- constructor(document: ViewDocument, hasMultiLevelListPlugin?: boolean, hasTablePropertiesPlugin?: boolean);
24
+ constructor(document: ViewDocument, hasMultiLevelListPlugin?: boolean, hasTablePropertiesPlugin?: boolean, enableSkipLevelLists?: boolean);
20
25
  /**
21
26
  * @inheritDoc
22
27
  */
@@ -24,5 +29,5 @@ export declare class PasteFromOfficeMSWordNormalizer implements PasteFromOfficeN
24
29
  /**
25
30
  * @inheritDoc
26
31
  */
27
- execute(data: PasteFromOfficeNormalizerData): void;
32
+ execute(data: ClipboardInputTransformationData): void;
28
33
  }
@@ -6,7 +6,9 @@
6
6
  * @module paste-from-office/pastefromoffice
7
7
  */
8
8
  import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import { type PriorityString } from '@ckeditor/ckeditor5-utils';
9
10
  import { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard';
11
+ import type { PasteFromOfficeNormalizer } from './normalizer.js';
10
12
  /**
11
13
  * The Paste from Office plugin.
12
14
  *
@@ -21,6 +23,10 @@ import { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard';
21
23
  * For more information about this feature check the {@glink api/paste-from-office package page}.
22
24
  */
23
25
  export declare class PasteFromOffice extends Plugin {
26
+ /**
27
+ * The priority array of registered normalizers.
28
+ */
29
+ private _normalizers;
24
30
  /**
25
31
  * @inheritDoc
26
32
  */
@@ -46,4 +52,8 @@ export declare class PasteFromOffice extends Plugin {
46
52
  * @inheritDoc
47
53
  */
48
54
  init(): void;
55
+ /**
56
+ * Registers a normalizer with the given priority.
57
+ */
58
+ registerNormalizer(normalizer: PasteFromOfficeNormalizer, priority?: PriorityString): void;
49
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-paste-from-office",
3
- "version": "48.1.1",
3
+ "version": "48.2.0-alpha.1",
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,9 +26,10 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "dependencies": {
29
- "@ckeditor/ckeditor5-clipboard": "48.1.1",
30
- "@ckeditor/ckeditor5-core": "48.1.1",
31
- "@ckeditor/ckeditor5-engine": "48.1.1"
29
+ "@ckeditor/ckeditor5-clipboard": "48.2.0-alpha.1",
30
+ "@ckeditor/ckeditor5-core": "48.2.0-alpha.1",
31
+ "@ckeditor/ckeditor5-engine": "48.2.0-alpha.1",
32
+ "@ckeditor/ckeditor5-utils": "48.2.0-alpha.1"
32
33
  },
33
34
  "files": [
34
35
  "dist",