@ckeditor/ckeditor5-import-word 48.2.0-alpha.7 → 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.
Files changed (155) hide show
  1. package/dist/augmentation.d.ts +21 -21
  2. package/dist/importword.d.ts +122 -122
  3. package/dist/importwordcommand.d.ts +83 -83
  4. package/dist/importwordediting.d.ts +38 -38
  5. package/dist/importwordui.d.ts +25 -25
  6. package/dist/index.d.ts +10 -10
  7. package/dist/index.js +1 -1
  8. package/dist/translations/af.js +1 -1
  9. package/dist/translations/af.umd.js +1 -1
  10. package/dist/translations/ar.js +1 -1
  11. package/dist/translations/ar.umd.js +1 -1
  12. package/dist/translations/ast.js +1 -1
  13. package/dist/translations/ast.umd.js +1 -1
  14. package/dist/translations/az.js +1 -1
  15. package/dist/translations/az.umd.js +1 -1
  16. package/dist/translations/be.js +1 -1
  17. package/dist/translations/be.umd.js +1 -1
  18. package/dist/translations/bg.js +1 -1
  19. package/dist/translations/bg.umd.js +1 -1
  20. package/dist/translations/bn.js +1 -1
  21. package/dist/translations/bn.umd.js +1 -1
  22. package/dist/translations/bs.js +1 -1
  23. package/dist/translations/bs.umd.js +1 -1
  24. package/dist/translations/ca.js +1 -1
  25. package/dist/translations/ca.umd.js +1 -1
  26. package/dist/translations/cs.js +1 -1
  27. package/dist/translations/cs.umd.js +1 -1
  28. package/dist/translations/da.js +1 -1
  29. package/dist/translations/da.umd.js +1 -1
  30. package/dist/translations/de-ch.js +1 -1
  31. package/dist/translations/de-ch.umd.js +1 -1
  32. package/dist/translations/de.js +1 -1
  33. package/dist/translations/de.umd.js +1 -1
  34. package/dist/translations/el.js +1 -1
  35. package/dist/translations/el.umd.js +1 -1
  36. package/dist/translations/en-au.js +1 -1
  37. package/dist/translations/en-au.umd.js +1 -1
  38. package/dist/translations/en-gb.js +1 -1
  39. package/dist/translations/en-gb.umd.js +1 -1
  40. package/dist/translations/en.js +1 -1
  41. package/dist/translations/en.umd.js +1 -1
  42. package/dist/translations/eo.js +1 -1
  43. package/dist/translations/eo.umd.js +1 -1
  44. package/dist/translations/es-co.js +1 -1
  45. package/dist/translations/es-co.umd.js +1 -1
  46. package/dist/translations/es.js +1 -1
  47. package/dist/translations/es.umd.js +1 -1
  48. package/dist/translations/et.js +1 -1
  49. package/dist/translations/et.umd.js +1 -1
  50. package/dist/translations/eu.js +1 -1
  51. package/dist/translations/eu.umd.js +1 -1
  52. package/dist/translations/fa.js +1 -1
  53. package/dist/translations/fa.umd.js +1 -1
  54. package/dist/translations/fi.js +1 -1
  55. package/dist/translations/fi.umd.js +1 -1
  56. package/dist/translations/fr.js +1 -1
  57. package/dist/translations/fr.umd.js +1 -1
  58. package/dist/translations/gl.js +1 -1
  59. package/dist/translations/gl.umd.js +1 -1
  60. package/dist/translations/gu.js +1 -1
  61. package/dist/translations/gu.umd.js +1 -1
  62. package/dist/translations/he.js +1 -1
  63. package/dist/translations/he.umd.js +1 -1
  64. package/dist/translations/hi.js +1 -1
  65. package/dist/translations/hi.umd.js +1 -1
  66. package/dist/translations/hr.js +1 -1
  67. package/dist/translations/hr.umd.js +1 -1
  68. package/dist/translations/hu.js +1 -1
  69. package/dist/translations/hu.umd.js +1 -1
  70. package/dist/translations/hy.js +1 -1
  71. package/dist/translations/hy.umd.js +1 -1
  72. package/dist/translations/id.js +1 -1
  73. package/dist/translations/id.umd.js +1 -1
  74. package/dist/translations/it.js +1 -1
  75. package/dist/translations/it.umd.js +1 -1
  76. package/dist/translations/ja.js +1 -1
  77. package/dist/translations/ja.umd.js +1 -1
  78. package/dist/translations/jv.js +1 -1
  79. package/dist/translations/jv.umd.js +1 -1
  80. package/dist/translations/kk.js +1 -1
  81. package/dist/translations/kk.umd.js +1 -1
  82. package/dist/translations/km.js +1 -1
  83. package/dist/translations/km.umd.js +1 -1
  84. package/dist/translations/kn.js +1 -1
  85. package/dist/translations/kn.umd.js +1 -1
  86. package/dist/translations/ko.js +1 -1
  87. package/dist/translations/ko.umd.js +1 -1
  88. package/dist/translations/ku.js +1 -1
  89. package/dist/translations/ku.umd.js +1 -1
  90. package/dist/translations/lt.js +1 -1
  91. package/dist/translations/lt.umd.js +1 -1
  92. package/dist/translations/lv.js +1 -1
  93. package/dist/translations/lv.umd.js +1 -1
  94. package/dist/translations/ms.js +1 -1
  95. package/dist/translations/ms.umd.js +1 -1
  96. package/dist/translations/nb.js +1 -1
  97. package/dist/translations/nb.umd.js +1 -1
  98. package/dist/translations/ne.js +1 -1
  99. package/dist/translations/ne.umd.js +1 -1
  100. package/dist/translations/nl.js +1 -1
  101. package/dist/translations/nl.umd.js +1 -1
  102. package/dist/translations/no.js +1 -1
  103. package/dist/translations/no.umd.js +1 -1
  104. package/dist/translations/oc.js +1 -1
  105. package/dist/translations/oc.umd.js +1 -1
  106. package/dist/translations/pl.js +1 -1
  107. package/dist/translations/pl.umd.js +1 -1
  108. package/dist/translations/pt-br.js +1 -1
  109. package/dist/translations/pt-br.umd.js +1 -1
  110. package/dist/translations/pt.js +1 -1
  111. package/dist/translations/pt.umd.js +1 -1
  112. package/dist/translations/ro.js +1 -1
  113. package/dist/translations/ro.umd.js +1 -1
  114. package/dist/translations/ru.js +1 -1
  115. package/dist/translations/ru.umd.js +1 -1
  116. package/dist/translations/si.js +1 -1
  117. package/dist/translations/si.umd.js +1 -1
  118. package/dist/translations/sk.js +1 -1
  119. package/dist/translations/sk.umd.js +1 -1
  120. package/dist/translations/sl.js +1 -1
  121. package/dist/translations/sl.umd.js +1 -1
  122. package/dist/translations/sq.js +1 -1
  123. package/dist/translations/sq.umd.js +1 -1
  124. package/dist/translations/sr-latn.js +1 -1
  125. package/dist/translations/sr-latn.umd.js +1 -1
  126. package/dist/translations/sr.js +1 -1
  127. package/dist/translations/sr.umd.js +1 -1
  128. package/dist/translations/sv.js +1 -1
  129. package/dist/translations/sv.umd.js +1 -1
  130. package/dist/translations/th.js +1 -1
  131. package/dist/translations/th.umd.js +1 -1
  132. package/dist/translations/ti.js +1 -1
  133. package/dist/translations/ti.umd.js +1 -1
  134. package/dist/translations/tk.js +1 -1
  135. package/dist/translations/tk.umd.js +1 -1
  136. package/dist/translations/tr.js +1 -1
  137. package/dist/translations/tr.umd.js +1 -1
  138. package/dist/translations/tt.js +1 -1
  139. package/dist/translations/tt.umd.js +1 -1
  140. package/dist/translations/ug.js +1 -1
  141. package/dist/translations/ug.umd.js +1 -1
  142. package/dist/translations/uk.js +1 -1
  143. package/dist/translations/uk.umd.js +1 -1
  144. package/dist/translations/ur.js +1 -1
  145. package/dist/translations/ur.umd.js +1 -1
  146. package/dist/translations/uz.js +1 -1
  147. package/dist/translations/uz.umd.js +1 -1
  148. package/dist/translations/vi.js +1 -1
  149. package/dist/translations/vi.umd.js +1 -1
  150. package/dist/translations/zh-cn.js +1 -1
  151. package/dist/translations/zh-cn.umd.js +1 -1
  152. package/dist/translations/zh.js +1 -1
  153. package/dist/translations/zh.umd.js +1 -1
  154. package/dist/utils/common-translations.d.ts +6 -6
  155. package/package.json +9 -9
@@ -1,23 +1,23 @@
1
1
  /**
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
- import type { ImportWordConfig, ImportWord, ImportWordEditing, ImportWordUI, ImportWordCommand } from './index.js';
6
- declare module '@ckeditor/ckeditor5-core' {
7
- interface EditorConfig {
8
- /**
9
- * The configuration of the {@link module:import-word/importword~ImportWord import from Word feature}.
10
- *
11
- * Read more in {@link module:import-word/importword~ImportWordConfig}.
12
- */
13
- importWord?: ImportWordConfig;
14
- }
15
- interface PluginsMap {
16
- [ImportWord.pluginName]: ImportWord;
17
- [ImportWordEditing.pluginName]: ImportWordEditing;
18
- [ImportWordUI.pluginName]: ImportWordUI;
19
- }
20
- interface CommandsMap {
21
- importWord: ImportWordCommand;
22
- }
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
+ import type { ImportWordConfig, ImportWord, ImportWordEditing, ImportWordUI, ImportWordCommand } from "./index.js";
6
+ declare module "@ckeditor/ckeditor5-core" {
7
+ interface EditorConfig {
8
+ /**
9
+ * The configuration of the {@link module:import-word/importword~ImportWord import from Word feature}.
10
+ *
11
+ * Read more in {@link module:import-word/importword~ImportWordConfig}.
12
+ */
13
+ importWord?: ImportWordConfig;
14
+ }
15
+ interface PluginsMap {
16
+ [ImportWord.pluginName]: ImportWord;
17
+ [ImportWordEditing.pluginName]: ImportWordEditing;
18
+ [ImportWordUI.pluginName]: ImportWordUI;
19
+ }
20
+ interface CommandsMap {
21
+ importWord: ImportWordCommand;
22
+ }
23
23
  }
@@ -1,132 +1,132 @@
1
1
  /**
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
- */
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
- * @module import-word/importword
7
- * @publicApi
8
- */
9
- import { Plugin } from '@ckeditor/ckeditor5-core';
10
- import type { TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
11
- import { ImportWordUI } from './importwordui.js';
12
- import { ImportWordEditing } from './importwordediting.js';
6
+ * @module import-word/importword
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
10
+ import type { TokenUrl } from "@ckeditor/ckeditor5-cloud-services";
11
+ import { ImportWordUI } from "./importwordui.js";
12
+ import { ImportWordEditing } from "./importwordediting.js";
13
13
  /**
14
- * The import from Word feature.
15
- *
16
- * It allows importing content from a Word file directly into CKEditor 5.
17
- *
18
- * This is a "glue" plugin which enables:
19
- *
20
- * * {@link module:import-word/importwordediting~ImportWordEditing},
21
- * * {@link module:import-word/importwordui~ImportWordUI},
22
- *
23
- * For a detailed overview, check the {@glink features/converters/import-word/import-word import from Word} feature documentation.
24
- */
14
+ * The import from Word feature.
15
+ *
16
+ * It allows importing content from a Word file directly into CKEditor 5.
17
+ *
18
+ * This is a "glue" plugin which enables:
19
+ *
20
+ * * {@link module:import-word/importwordediting~ImportWordEditing},
21
+ * * {@link module:import-word/importwordui~ImportWordUI},
22
+ *
23
+ * For a detailed overview, check the {@glink features/converters/import-word/import-word import from Word} feature documentation.
24
+ */
25
25
  export declare class ImportWord extends Plugin {
26
- /**
27
- * @inheritDoc
28
- */
29
- static get pluginName(): "ImportWord";
30
- /**
31
- * @inheritDoc
32
- */
33
- static get isOfficialPlugin(): true;
34
- /**
35
- * @inheritDoc
36
- */
37
- static get isPremiumPlugin(): true;
38
- /**
39
- * @inheritDoc
40
- */
41
- static get requires(): readonly [typeof ImportWordEditing, typeof ImportWordUI];
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): "ImportWord";
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static override get isOfficialPlugin(): true;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static override get isPremiumPlugin(): true;
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ static get requires(): PluginDependenciesOf<[ImportWordEditing, ImportWordUI]>;
42
42
  }
43
43
  /**
44
- * The configuration of the {@link module:import-word/importword~ImportWord import from Word feature}.
45
- *
46
- * The configuration for the import from Word feature requires providing the
47
- * {@link module:import-word/importword~ImportWordConfig#tokenUrl `config.importWord.tokenUrl`}:
48
- *
49
- * ```ts
50
- * ClassicEditor
51
- * .create( {
52
- * importWord: {
53
- * tokenUrl: 'https://example.com/cs-token-endpoint'
54
- * }
55
- * } )
56
- * .then( ... )
57
- * .catch( ... );
58
- * ```
59
- *
60
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
61
- */
44
+ * The configuration of the {@link module:import-word/importword~ImportWord import from Word feature}.
45
+ *
46
+ * The configuration for the import from Word feature requires providing the
47
+ * {@link module:import-word/importword~ImportWordConfig#tokenUrl `config.importWord.tokenUrl`}:
48
+ *
49
+ * ```ts
50
+ * ClassicEditor
51
+ * .create( {
52
+ * importWord: {
53
+ * tokenUrl: 'https://example.com/cs-token-endpoint'
54
+ * }
55
+ * } )
56
+ * .then( ... )
57
+ * .catch( ... );
58
+ * ```
59
+ *
60
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
61
+ */
62
62
  export interface ImportWordConfig {
63
- /**
64
- * A URL to the Docx converter.
65
- *
66
- * ```ts
67
- * const importWordConfig = {
68
- * converterUrl: 'https://myconverter.com/v1/'
69
- * }
70
- * ```
71
- *
72
- * **Note:** The plugin uses the default Word to HTML converter delivered by CKEditor Cloud Services.
73
- * You can provide a URL to an on-premises converter instead.
74
- *
75
- * @default 'https://docx-converter.cke-cs.com/v2/convert/docx-html'
76
- */
77
- converterUrl?: string;
78
- /**
79
- * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl`
80
- * is required for the Import from Word feature.
81
- *
82
- * **Note:** The token can be disabled with the `false` value provided.
83
- *
84
- * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
85
- */
86
- tokenUrl?: TokenUrl;
87
- formatting: ImportWordFormattingOptions;
63
+ /**
64
+ * A URL to the Docx converter.
65
+ *
66
+ * ```ts
67
+ * const importWordConfig = {
68
+ * converterUrl: 'https://myconverter.com/v1/'
69
+ * }
70
+ * ```
71
+ *
72
+ * **Note:** The plugin uses the default Word to HTML converter delivered by CKEditor Cloud Services.
73
+ * You can provide a URL to an on-premises converter instead.
74
+ *
75
+ * @default 'https://docx-converter.cke-cs.com/v2/convert/docx-html'
76
+ */
77
+ converterUrl?: string;
78
+ /**
79
+ * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl`
80
+ * is required for the Import from Word feature.
81
+ *
82
+ * **Note:** The token can be disabled with the `false` value provided.
83
+ *
84
+ * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
85
+ */
86
+ tokenUrl?: TokenUrl;
87
+ formatting: ImportWordFormattingOptions;
88
88
  }
89
89
  export interface ImportWordFormattingOptions {
90
- /**
91
- * Controls whether the additional formatting dedicated to minimizing differences between default Word styles
92
- * and default HTML formatting should be included in the generated document.
93
- *
94
- * If `inline`, the converter service preserves the formatting to be consistent with Word ones.
95
- * For example, in Word headings are not bold by default, whereas in HTML, they are. Enabling this option
96
- * appends font-weight: normal to all headings.
97
- *
98
- * @default false
99
- */
100
- resets?: 'none' | 'inline';
101
- /**
102
- * Controls whether formatting set by default (like the default font size or default font family)
103
- * should be included in the generated document.
104
- *
105
- * If `inline`, the converter service preserves the default formatting of the imported Word document.
106
- *
107
- * @default 'none'
108
- */
109
- defaults?: 'none' | 'inline';
110
- /**
111
- * Controls whether Word styles should be included in the generated document.
112
- *
113
- * If `inline`, the converter service preserves the default styles of the imported Word document.
114
- *
115
- * @default 'inline'
116
- */
117
- styles?: 'none' | 'inline';
118
- /**
119
- * Defines which formatting styles should be kept for the imported comments text.
120
- *
121
- * Possible values are:
122
- *
123
- * * `'basic'` - basic styles are kept (bold, italic, underline, strikethrough and links),
124
- * * `'none'` - comment text is imported without any styling,
125
- * * `'full'` - all styles are kept (not recommended).
126
- *
127
- * **Note:** Please remember that importing comments requires installing the {@link module:comments/comments~Comments} feature.
128
- *
129
- * @default 'basic'
130
- */
131
- comments?: 'basic' | 'none' | 'full';
90
+ /**
91
+ * Controls whether the additional formatting dedicated to minimizing differences between default Word styles
92
+ * and default HTML formatting should be included in the generated document.
93
+ *
94
+ * If `inline`, the converter service preserves the formatting to be consistent with Word ones.
95
+ * For example, in Word headings are not bold by default, whereas in HTML, they are. Enabling this option
96
+ * appends font-weight: normal to all headings.
97
+ *
98
+ * @default false
99
+ */
100
+ resets?: "none" | "inline";
101
+ /**
102
+ * Controls whether formatting set by default (like the default font size or default font family)
103
+ * should be included in the generated document.
104
+ *
105
+ * If `inline`, the converter service preserves the default formatting of the imported Word document.
106
+ *
107
+ * @default 'none'
108
+ */
109
+ defaults?: "none" | "inline";
110
+ /**
111
+ * Controls whether Word styles should be included in the generated document.
112
+ *
113
+ * If `inline`, the converter service preserves the default styles of the imported Word document.
114
+ *
115
+ * @default 'inline'
116
+ */
117
+ styles?: "none" | "inline";
118
+ /**
119
+ * Defines which formatting styles should be kept for the imported comments text.
120
+ *
121
+ * Possible values are:
122
+ *
123
+ * * `'basic'` - basic styles are kept (bold, italic, underline, strikethrough and links),
124
+ * * `'none'` - comment text is imported without any styling,
125
+ * * `'full'` - all styles are kept (not recommended).
126
+ *
127
+ * **Note:** Please remember that importing comments requires installing the {@link module:comments/comments~Comments} feature.
128
+ *
129
+ * @default 'basic'
130
+ */
131
+ comments?: "basic" | "none" | "full";
132
132
  }
@@ -1,99 +1,99 @@
1
1
  /**
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
- */
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
- * @module import-word/importwordcommand
7
- * @publicApi
8
- */
9
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
10
- import { type Batch } from '@ckeditor/ckeditor5-engine';
6
+ * @module import-word/importwordcommand
7
+ * @publicApi
8
+ */
9
+ import { Command, type Editor } from "@ckeditor/ckeditor5-core";
10
+ import { type Batch } from "@ckeditor/ckeditor5-engine";
11
11
  /**
12
- * The import from Word command.
13
- *
14
- * It sends the Word file to the converter endpoint and inserts its content into the editor.
15
- */
12
+ * The import from Word command.
13
+ *
14
+ * It sends the Word file to the converter endpoint and inserts its content into the editor.
15
+ */
16
16
  export declare class ImportWordCommand extends Command {
17
- /**
18
- * A command state that indicates if the command is currently executing.
19
- *
20
- * @observable
21
- */
22
- isBusy: boolean;
23
- /**
24
- * @inheritDoc
25
- */
26
- constructor(editor: Editor);
27
- /**
28
- * @inheritDoc
29
- */
30
- refresh(): void;
31
- /**
32
- * Executes the command. Sends the provided file instance to the converter service endpoint and inserts the result into the model.
33
- *
34
- * @fires execute
35
- * @param file The Word file instance to be uploaded for conversion.
36
- * @param [serviceConfig] Additional options to pass to the converter service.
37
- */
38
- execute(file: File, serviceConfig?: Record<string, unknown>): Promise<unknown>;
17
+ /**
18
+ * A command state that indicates if the command is currently executing.
19
+ *
20
+ * @observable
21
+ */
22
+ isBusy: boolean;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ constructor(editor: Editor);
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ override refresh(): void;
31
+ /**
32
+ * Executes the command. Sends the provided file instance to the converter service endpoint and inserts the result into the model.
33
+ *
34
+ * @fires execute
35
+ * @param file The Word file instance to be uploaded for conversion.
36
+ * @param [serviceConfig] Additional options to pass to the converter service.
37
+ */
38
+ override execute(file: File, serviceConfig?: Record<string, unknown>): Promise<unknown>;
39
39
  }
40
40
  /**
41
- * Fired when the converter service returned the HTML content that will be inserted into the editor.
42
- *
43
- * @eventName ~ImportWordCommand#dataInsert
44
- */
41
+ * Fired when the converter service returned the HTML content that will be inserted into the editor.
42
+ *
43
+ * @eventName ~ImportWordCommand#dataInsert
44
+ */
45
45
  export type ImportWordDataInsertEvent = {
46
- name: 'dataInsert';
47
- args: [data: ImportWordDataInsertEventData];
46
+ name: "dataInsert";
47
+ args: [data: ImportWordDataInsertEventData];
48
48
  };
49
49
  export interface ImportWordDataInsertEventData {
50
- /**
51
- * The batch used to undo all changes made by the command. Each time the command is executed, a new batch is created.
52
- * Use it when some additional changes should be added to the document as part of the same undo step.
53
- */
54
- readonly undoStepBatch: Batch;
55
- /**
56
- * The HTML content to insertion.
57
- */
58
- html: string;
59
- /**
60
- * The headers definitions extracted from the Word document.
61
- * Contains HTML content for different types of headers (default, first page, odd/even pages).
62
- */
63
- headers?: ImportWordDataHeaderFooterDefinitions;
64
- /**
65
- * The footers definitions extracted from the Word document.
66
- * Contains HTML content for different types of footers (default, first page, odd/even pages).
67
- */
68
- footers?: ImportWordDataHeaderFooterDefinitions;
50
+ /**
51
+ * The batch used to undo all changes made by the command. Each time the command is executed, a new batch is created.
52
+ * Use it when some additional changes should be added to the document as part of the same undo step.
53
+ */
54
+ readonly undoStepBatch: Batch;
55
+ /**
56
+ * The HTML content to insertion.
57
+ */
58
+ html: string;
59
+ /**
60
+ * The headers definitions extracted from the Word document.
61
+ * Contains HTML content for different types of headers (default, first page, odd/even pages).
62
+ */
63
+ headers?: ImportWordDataHeaderFooterDefinitions;
64
+ /**
65
+ * The footers definitions extracted from the Word document.
66
+ * Contains HTML content for different types of footers (default, first page, odd/even pages).
67
+ */
68
+ footers?: ImportWordDataHeaderFooterDefinitions;
69
69
  }
70
70
  /**
71
- * Represents a collection of header or footer definitions corresponding to different page types.
72
- */
71
+ * Represents a collection of header or footer definitions corresponding to different page types.
72
+ */
73
73
  export interface ImportWordDataHeaderFooterDefinitions {
74
- /**
75
- * Content for the default header/footer. Used for all pages unless specific overrides (first/odd/even) apply.
76
- */
77
- default?: ImportWordDataHeaderFooterContent;
78
- /**
79
- * Content for the first page header/footer.
80
- */
81
- first?: ImportWordDataHeaderFooterContent;
82
- /**
83
- * Content for the odd pages header/footer.
84
- */
85
- odd?: ImportWordDataHeaderFooterContent;
86
- /**
87
- * Content for the even pages header/footer.
88
- */
89
- even?: ImportWordDataHeaderFooterContent;
74
+ /**
75
+ * Content for the default header/footer. Used for all pages unless specific overrides (first/odd/even) apply.
76
+ */
77
+ default?: ImportWordDataHeaderFooterContent;
78
+ /**
79
+ * Content for the first page header/footer.
80
+ */
81
+ first?: ImportWordDataHeaderFooterContent;
82
+ /**
83
+ * Content for the odd pages header/footer.
84
+ */
85
+ odd?: ImportWordDataHeaderFooterContent;
86
+ /**
87
+ * Content for the even pages header/footer.
88
+ */
89
+ even?: ImportWordDataHeaderFooterContent;
90
90
  }
91
91
  /**
92
- * Represents the content of a single header or footer variant.
93
- */
92
+ * Represents the content of a single header or footer variant.
93
+ */
94
94
  export interface ImportWordDataHeaderFooterContent {
95
- /**
96
- * The HTML content of the header or footer.
97
- */
98
- html: string;
95
+ /**
96
+ * The HTML content of the header or footer.
97
+ */
98
+ html: string;
99
99
  }
@@ -1,43 +1,43 @@
1
1
  /**
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
- */
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
- * @module import-word/importwordediting
7
- * @publicApi
8
- */
9
- import { Plugin } from '@ckeditor/ckeditor5-core';
10
- import { Notification } from '@ckeditor/ckeditor5-ui';
11
- import { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard';
12
- import { CloudServices, type InitializedToken } from '@ckeditor/ckeditor5-cloud-services';
6
+ * @module import-word/importwordediting
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
10
+ import { Notification } from "@ckeditor/ckeditor5-ui";
11
+ import { ClipboardPipeline } from "@ckeditor/ckeditor5-clipboard";
12
+ import { CloudServices, type InitializedToken } from "@ckeditor/ckeditor5-cloud-services";
13
13
  /**
14
- * The editing part of the import from Word feature.
15
- *
16
- * It registers the {@link module:import-word/importwordcommand~ImportWordCommand `'importWord'` command}.
17
- */
14
+ * The editing part of the import from Word feature.
15
+ *
16
+ * It registers the {@link module:import-word/importwordcommand~ImportWordCommand `'importWord'` command}.
17
+ */
18
18
  export declare class ImportWordEditing extends Plugin {
19
- /**
20
- * @inheritDoc
21
- */
22
- static get pluginName(): "ImportWordEditing";
23
- /**
24
- * @inheritDoc
25
- */
26
- static get isOfficialPlugin(): true;
27
- /**
28
- * @inheritDoc
29
- */
30
- static get isPremiumPlugin(): true;
31
- /**
32
- * @inheritDoc
33
- */
34
- static get requires(): readonly [typeof Notification, typeof ClipboardPipeline, typeof CloudServices];
35
- /**
36
- * @inheritDoc
37
- */
38
- init(): void;
39
- /**
40
- * Returns a token used by the import from Word plugin for communication with the Cloud Services.
41
- */
42
- getToken(): Promise<InitializedToken | null>;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): "ImportWordEditing";
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static override get isOfficialPlugin(): true;
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static override get isPremiumPlugin(): true;
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ static get requires(): PluginDependenciesOf<[Notification, ClipboardPipeline, CloudServices]>;
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ init(): void;
39
+ /**
40
+ * Returns a token used by the import from Word plugin for communication with the Cloud Services.
41
+ */
42
+ getToken(): Promise<InitializedToken | null>;
43
43
  }
@@ -1,30 +1,30 @@
1
1
  /**
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
- */
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
- * @module import-word/importwordui
7
- * @publicApi
8
- */
9
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module import-word/importwordui
7
+ * @publicApi
8
+ */
9
+ import { Plugin } from "@ckeditor/ckeditor5-core";
10
10
  /**
11
- * The ImportWordUI plugin. It introduces the `'importWord'` toolbar button.
12
- */
11
+ * The ImportWordUI plugin. It introduces the `'importWord'` toolbar button.
12
+ */
13
13
  export declare class ImportWordUI extends Plugin {
14
- /**
15
- * @inheritDoc
16
- */
17
- static get pluginName(): "ImportWordUI";
18
- /**
19
- * @inheritDoc
20
- */
21
- static get isOfficialPlugin(): true;
22
- /**
23
- * @inheritDoc
24
- */
25
- static get isPremiumPlugin(): true;
26
- /**
27
- * @inheritDoc
28
- */
29
- init(): void;
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ static get pluginName(): "ImportWordUI";
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static override get isOfficialPlugin(): true;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static override get isPremiumPlugin(): true;
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ init(): void;
30
30
  }
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
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
- */
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
- * @module import-word
7
- */
8
- export { ImportWord, type ImportWordConfig, type ImportWordFormattingOptions } from './importword.js';
9
- export { ImportWordEditing } from './importwordediting.js';
10
- export { ImportWordUI } from './importwordui.js';
11
- export { ImportWordCommand, type ImportWordDataInsertEvent, type ImportWordDataInsertEventData, type ImportWordDataHeaderFooterDefinitions, type ImportWordDataHeaderFooterContent } from './importwordcommand.js';
12
- import './augmentation.js';
6
+ * @module import-word
7
+ */
8
+ export { ImportWord, type ImportWordConfig, type ImportWordFormattingOptions } from "./importword.js";
9
+ export { ImportWordEditing } from "./importwordediting.js";
10
+ export { ImportWordUI } from "./importwordui.js";
11
+ export { ImportWordCommand, type ImportWordDataInsertEvent, type ImportWordDataInsertEventData, type ImportWordDataHeaderFooterDefinitions, type ImportWordDataHeaderFooterContent } from "./importwordcommand.js";
12
+ import "./augmentation.js";