@ckeditor/ckeditor5-export-word 48.2.0 → 48.3.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.
Files changed (155) hide show
  1. package/dist/augmentation.d.ts +19 -19
  2. package/dist/exportword.d.ts +314 -314
  3. package/dist/exportwordcommand.d.ts +31 -31
  4. package/dist/exportwordui.d.ts +26 -26
  5. package/dist/index.d.ts +8 -8
  6. package/dist/index.js +1 -1
  7. package/dist/translations/af.js +1 -1
  8. package/dist/translations/af.umd.js +1 -1
  9. package/dist/translations/ar.js +1 -1
  10. package/dist/translations/ar.umd.js +1 -1
  11. package/dist/translations/ast.js +1 -1
  12. package/dist/translations/ast.umd.js +1 -1
  13. package/dist/translations/az.js +1 -1
  14. package/dist/translations/az.umd.js +1 -1
  15. package/dist/translations/be.js +1 -1
  16. package/dist/translations/be.umd.js +1 -1
  17. package/dist/translations/bg.js +1 -1
  18. package/dist/translations/bg.umd.js +1 -1
  19. package/dist/translations/bn.js +1 -1
  20. package/dist/translations/bn.umd.js +1 -1
  21. package/dist/translations/bs.js +1 -1
  22. package/dist/translations/bs.umd.js +1 -1
  23. package/dist/translations/ca.js +1 -1
  24. package/dist/translations/ca.umd.js +1 -1
  25. package/dist/translations/cs.js +1 -1
  26. package/dist/translations/cs.umd.js +1 -1
  27. package/dist/translations/da.js +1 -1
  28. package/dist/translations/da.umd.js +1 -1
  29. package/dist/translations/de-ch.js +1 -1
  30. package/dist/translations/de-ch.umd.js +1 -1
  31. package/dist/translations/de.js +1 -1
  32. package/dist/translations/de.umd.js +1 -1
  33. package/dist/translations/el.js +1 -1
  34. package/dist/translations/el.umd.js +1 -1
  35. package/dist/translations/en-au.js +1 -1
  36. package/dist/translations/en-au.umd.js +1 -1
  37. package/dist/translations/en-gb.js +1 -1
  38. package/dist/translations/en-gb.umd.js +1 -1
  39. package/dist/translations/en.js +1 -1
  40. package/dist/translations/en.umd.js +1 -1
  41. package/dist/translations/eo.js +1 -1
  42. package/dist/translations/eo.umd.js +1 -1
  43. package/dist/translations/es-co.js +1 -1
  44. package/dist/translations/es-co.umd.js +1 -1
  45. package/dist/translations/es.js +1 -1
  46. package/dist/translations/es.umd.js +1 -1
  47. package/dist/translations/et.js +1 -1
  48. package/dist/translations/et.umd.js +1 -1
  49. package/dist/translations/eu.js +1 -1
  50. package/dist/translations/eu.umd.js +1 -1
  51. package/dist/translations/fa.js +1 -1
  52. package/dist/translations/fa.umd.js +1 -1
  53. package/dist/translations/fi.js +1 -1
  54. package/dist/translations/fi.umd.js +1 -1
  55. package/dist/translations/fr.js +1 -1
  56. package/dist/translations/fr.umd.js +1 -1
  57. package/dist/translations/gl.js +1 -1
  58. package/dist/translations/gl.umd.js +1 -1
  59. package/dist/translations/gu.js +1 -1
  60. package/dist/translations/gu.umd.js +1 -1
  61. package/dist/translations/he.js +1 -1
  62. package/dist/translations/he.umd.js +1 -1
  63. package/dist/translations/hi.js +1 -1
  64. package/dist/translations/hi.umd.js +1 -1
  65. package/dist/translations/hr.js +1 -1
  66. package/dist/translations/hr.umd.js +1 -1
  67. package/dist/translations/hu.js +1 -1
  68. package/dist/translations/hu.umd.js +1 -1
  69. package/dist/translations/hy.js +1 -1
  70. package/dist/translations/hy.umd.js +1 -1
  71. package/dist/translations/id.js +1 -1
  72. package/dist/translations/id.umd.js +1 -1
  73. package/dist/translations/it.js +1 -1
  74. package/dist/translations/it.umd.js +1 -1
  75. package/dist/translations/ja.js +1 -1
  76. package/dist/translations/ja.umd.js +1 -1
  77. package/dist/translations/jv.js +1 -1
  78. package/dist/translations/jv.umd.js +1 -1
  79. package/dist/translations/kk.js +1 -1
  80. package/dist/translations/kk.umd.js +1 -1
  81. package/dist/translations/km.js +1 -1
  82. package/dist/translations/km.umd.js +1 -1
  83. package/dist/translations/kn.js +1 -1
  84. package/dist/translations/kn.umd.js +1 -1
  85. package/dist/translations/ko.js +1 -1
  86. package/dist/translations/ko.umd.js +1 -1
  87. package/dist/translations/ku.js +1 -1
  88. package/dist/translations/ku.umd.js +1 -1
  89. package/dist/translations/lt.js +1 -1
  90. package/dist/translations/lt.umd.js +1 -1
  91. package/dist/translations/lv.js +1 -1
  92. package/dist/translations/lv.umd.js +1 -1
  93. package/dist/translations/ms.js +1 -1
  94. package/dist/translations/ms.umd.js +1 -1
  95. package/dist/translations/nb.js +1 -1
  96. package/dist/translations/nb.umd.js +1 -1
  97. package/dist/translations/ne.js +1 -1
  98. package/dist/translations/ne.umd.js +1 -1
  99. package/dist/translations/nl.js +1 -1
  100. package/dist/translations/nl.umd.js +1 -1
  101. package/dist/translations/no.js +1 -1
  102. package/dist/translations/no.umd.js +1 -1
  103. package/dist/translations/oc.js +1 -1
  104. package/dist/translations/oc.umd.js +1 -1
  105. package/dist/translations/pl.js +1 -1
  106. package/dist/translations/pl.umd.js +1 -1
  107. package/dist/translations/pt-br.js +1 -1
  108. package/dist/translations/pt-br.umd.js +1 -1
  109. package/dist/translations/pt.js +1 -1
  110. package/dist/translations/pt.umd.js +1 -1
  111. package/dist/translations/ro.js +1 -1
  112. package/dist/translations/ro.umd.js +1 -1
  113. package/dist/translations/ru.js +1 -1
  114. package/dist/translations/ru.umd.js +1 -1
  115. package/dist/translations/si.js +1 -1
  116. package/dist/translations/si.umd.js +1 -1
  117. package/dist/translations/sk.js +1 -1
  118. package/dist/translations/sk.umd.js +1 -1
  119. package/dist/translations/sl.js +1 -1
  120. package/dist/translations/sl.umd.js +1 -1
  121. package/dist/translations/sq.js +1 -1
  122. package/dist/translations/sq.umd.js +1 -1
  123. package/dist/translations/sr-latn.js +1 -1
  124. package/dist/translations/sr-latn.umd.js +1 -1
  125. package/dist/translations/sr.js +1 -1
  126. package/dist/translations/sr.umd.js +1 -1
  127. package/dist/translations/sv.js +1 -1
  128. package/dist/translations/sv.umd.js +1 -1
  129. package/dist/translations/th.js +1 -1
  130. package/dist/translations/th.umd.js +1 -1
  131. package/dist/translations/ti.js +1 -1
  132. package/dist/translations/ti.umd.js +1 -1
  133. package/dist/translations/tk.js +1 -1
  134. package/dist/translations/tk.umd.js +1 -1
  135. package/dist/translations/tr.js +1 -1
  136. package/dist/translations/tr.umd.js +1 -1
  137. package/dist/translations/tt.js +1 -1
  138. package/dist/translations/tt.umd.js +1 -1
  139. package/dist/translations/ug.js +1 -1
  140. package/dist/translations/ug.umd.js +1 -1
  141. package/dist/translations/uk.js +1 -1
  142. package/dist/translations/uk.umd.js +1 -1
  143. package/dist/translations/ur.js +1 -1
  144. package/dist/translations/ur.umd.js +1 -1
  145. package/dist/translations/uz.js +1 -1
  146. package/dist/translations/uz.umd.js +1 -1
  147. package/dist/translations/vi.js +1 -1
  148. package/dist/translations/vi.umd.js +1 -1
  149. package/dist/translations/zh-cn.js +1 -1
  150. package/dist/translations/zh-cn.umd.js +1 -1
  151. package/dist/translations/zh.js +1 -1
  152. package/dist/translations/zh.umd.js +1 -1
  153. package/dist/utils/common-translations.d.ts +6 -6
  154. package/dist/utils.d.ts +0 -4
  155. package/package.json +10 -10
@@ -1,360 +1,360 @@
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 export-word/exportword
7
- * @publicApi
8
- */
9
- import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
10
- import { Notification } from '@ckeditor/ckeditor5-ui';
11
- import { CloudServices, type InitializedToken, type TokenUrl } from '@ckeditor/ckeditor5-cloud-services';
12
- import { ExportWordUI } from './exportwordui.js';
6
+ * @module export-word/exportword
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
10
+ import { Notification } from "@ckeditor/ckeditor5-ui";
11
+ import { CloudServices, type InitializedToken, type TokenUrl } from "@ckeditor/ckeditor5-cloud-services";
12
+ import { ExportWordUI } from "./exportwordui.js";
13
13
  /**
14
- * The export to Word feature.
15
- *
16
- * It allows you to generate a Word file directly from the editor content.
17
- *
18
- * For a detailed overview, check the {@glink features/converters/export-word export to Word} feature documentation.
19
- */
14
+ * The export to Word feature.
15
+ *
16
+ * It allows you to generate a Word file directly from the editor content.
17
+ *
18
+ * For a detailed overview, check the {@glink features/converters/export-word export to Word} feature documentation.
19
+ */
20
20
  export declare class ExportWord extends Plugin {
21
- /**
22
- * @inheritDoc
23
- */
24
- static get pluginName(): "ExportWord";
25
- /**
26
- * @inheritDoc
27
- */
28
- static get isOfficialPlugin(): true;
29
- /**
30
- * @inheritDoc
31
- */
32
- static get isPremiumPlugin(): true;
33
- /**
34
- * @inheritDoc
35
- */
36
- static get requires(): readonly [typeof CloudServices, typeof Notification, typeof ExportWordUI];
37
- /**
38
- * @inheritDoc
39
- */
40
- init(): void;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName(): "ExportWord";
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static override get isOfficialPlugin(): true;
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static override get isPremiumPlugin(): true;
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ static get requires(): PluginDependenciesOf<[CloudServices, Notification, ExportWordUI]>;
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ init(): void;
41
41
  }
42
42
  /**
43
- * The configuration of the export to Word feature. It is used by the Word export features from
44
- * the `@ckeditor/ckeditor5-export-word` package.
45
- *
46
- * ```ts
47
- * ClassicEditor
48
- * .create( {
49
- * exportWord: ... // Export to Word feature options.
50
- * } )
51
- * .then( ... )
52
- * .catch( ... );
53
- * ```
54
- *
55
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
56
- */
43
+ * The configuration of the export to Word feature. It is used by the Word export features from
44
+ * the `@ckeditor/ckeditor5-export-word` package.
45
+ *
46
+ * ```ts
47
+ * ClassicEditor
48
+ * .create( {
49
+ * exportWord: ... // Export to Word feature options.
50
+ * } )
51
+ * .then( ... )
52
+ * .catch( ... );
53
+ * ```
54
+ *
55
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
56
+ */
57
57
  export interface ExportWordConfig {
58
- /**
59
- * Paths to the `.css` files containing additional styling for the editor's content (**the order of provided items matters**).
60
- *
61
- * ```ts
62
- * const exportWordConfig = {
63
- * stylesheets: [ './path/to/custom-style.css' ]
64
- * }
65
- * ```
66
- *
67
- * **Default editor's content styles**:
68
- * {@glink getting-started/setup/css The default editor content styles}
69
- * are applied to the generated Word file thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
70
- * If you don't want them to be applied, you have to omit the token:
71
- *
72
- * **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
73
- * In other setups you always need to pass the stylesheets.
74
- *
75
- * ```ts
76
- * const exportWordConfig = {
77
- * stylesheets: [ './path/to/custom-editor-styles.css' ]
78
- * }
79
- * ```
80
- *
81
- * **Custom styling:** For more advanced styling, your configuration should look like this:
82
- *
83
- * ```ts
84
- * const exportWordConfig = {
85
- * stylesheets: [
86
- * './path/to/editor-styles.css',
87
- * './path/to/custom-styles.css'
88
- * ]
89
- * }
90
- * ```
91
- *
92
- * @default `[ 'EDITOR_STYLES' ]`
93
- */
94
- stylesheets?: Array<string>;
95
- /**
96
- * The name of the generated Word file.
97
- *
98
- * ```ts
99
- * // Static file name.
100
- * const exportWordConfig = {
101
- * fileName: 'my-document.docx'
102
- * }
103
- *
104
- *
105
- * // Dynamic file name.
106
- * const exportWordConfig = {
107
- * fileName: () => {
108
- * const articleTitle = document.querySelector( '#title' );
109
- *
110
- * return `${ articleTitle.value }.docx`;
111
- * }
112
- * }
113
- * ```
114
- *
115
- * **NOTE:** The file name must contain the `.docx` extension.
116
- * Otherwise your operating system or device may have trouble identifying the file type.
117
- *
118
- * @default 'document.docx'
119
- */
120
- fileName?: string | (() => string);
121
- /**
122
- * A URL to the Docx converter.
123
- *
124
- * ```ts
125
- * const exportWordConfig = {
126
- * converterUrl: 'https://myconverter.com/v2/'
127
- * }
128
- * ```
129
- *
130
- * **NOTE:** The plugin uses the default HTML to Word converter delivered by CKEditor Cloud Services.
131
- * You can provide a URL to an on-premises converter instead.
132
- *
133
- * @default 'https://docx-converter.cke-cs.com/v2/convert/html-docx'
134
- */
135
- converterUrl?: string;
136
- /**
137
- * The CKEditor Cloud Services HTML to DOCX Converter [configuration options](https://docx-converter.cke-cs.com/docs#section/Options).
138
- *
139
- * **NOTE:** Configuring the plugin is not mandatory.
140
- *
141
- * ```ts
142
- * const exportWordConfig = {
143
- * converterOptions: {
144
- * ...
145
- * }
146
- * }
147
- * ```
148
- *
149
- * @default `{
150
- * document: {
151
- * size: 'A4',
152
- * orientation: 'portrait',
153
- * language: editor.locale.contentLanguage,
154
- * margin: {
155
- * top: '1in',
156
- * bottom: '1in',
157
- * right: '1in',
158
- * left: '1in'
159
- * }
160
- * }
161
- * headers: undefined,
162
- * footers: undefined,
163
- * auto_pagination: false,
164
- * base_url: undefined,
165
- * extra_http_headers: undefined
166
- * }`
167
- */
168
- converterOptions?: ExportWordConverterOptions | ExportWordConverterOptionsV2;
169
- /**
170
- * A function to gather the HTML to be converted to Word.
171
- *
172
- * **NOTE:** This option may be useful when the editor does not have a `getData()` method,
173
- * or if the HTML to be converted should be different than the edited one.
174
- *
175
- * ```ts
176
- * const exportWordConfig = {
177
- * dataCallback: ( editor ) => {
178
- * return `
179
- * <header id="header">${ editor.data.get( { rootName: 'header' } ) }</header>
180
- * <div id="content">${ editor.data.get( { rootName: 'content' } ) }</div>
181
- * `;
182
- * }
183
- * }
184
- * ```
185
- *
186
- * @default `( editor ) => editor.getData( { pagination: true } )
187
- *
188
- * If using the {@glink features/pagination/pagination pagination} feature, the `pagination:true` option inserts additional markers into
189
- * editor's data. Thanks to that, the Docx converter creates a Word document similar to what is displayed in the editor.
190
- */
191
- dataCallback?: (editor: Editor) => string;
192
- /**
193
- * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl` is required for
194
- * the export to Word feature.
195
- *
196
- * **Note:** The token can be disabled with the `false` value provided.
197
- *
198
- * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
199
- */
200
- tokenUrl?: TokenUrl | false;
201
- /**
202
- * The authentication token.
203
- *
204
- * See: {@link module:cloud-services/cloudservices~CloudServices#token}
205
- */
206
- token?: InitializedToken;
207
- /**
208
- * The version of `Export to Word` API.
209
- *
210
- * @default '2'
211
- */
212
- version?: 1 | 2;
213
- /**
214
- * The watermark configuration.
215
- *
216
- * ```ts
217
- * converterOptions: {
218
- * watermark: {
219
- * source: 'https://placehold.co/200',
220
- * width: '500px',
221
- * height: '600px',
222
- * washout: 'false'
223
- * }
224
- * }
225
- * ```
226
- *
227
- * The watermark configuration is represented as an object containing 4 properties:
228
- *
229
- * - `source`: A source of the image used for the watermark.
230
- * - `width`: A string value representing the width of the watermark.
231
- * - `height`: A string value representing the height of the watermark.
232
- * - `washout`: Determines whether the washout effect should be applied. Optional - the default value is `false`.
233
- *
234
- */
235
- watermark?: ExportWordConverterWatermarkV2;
58
+ /**
59
+ * Paths to the `.css` files containing additional styling for the editor's content (**the order of provided items matters**).
60
+ *
61
+ * ```ts
62
+ * const exportWordConfig = {
63
+ * stylesheets: [ './path/to/custom-style.css' ]
64
+ * }
65
+ * ```
66
+ *
67
+ * **Default editor's content styles**:
68
+ * {@glink getting-started/setup/css The default editor content styles}
69
+ * are applied to the generated Word file thanks to the `'EDITOR_STYLES'` token, which is provided to the `stylesheets` by default.
70
+ * If you don't want them to be applied, you have to omit the token:
71
+ *
72
+ * **NOTE:** The `'EDITOR_STYLES'` string is only supported in legacy custom builds with webpack or DLLs.
73
+ * In other setups you always need to pass the stylesheets.
74
+ *
75
+ * ```ts
76
+ * const exportWordConfig = {
77
+ * stylesheets: [ './path/to/custom-editor-styles.css' ]
78
+ * }
79
+ * ```
80
+ *
81
+ * **Custom styling:** For more advanced styling, your configuration should look like this:
82
+ *
83
+ * ```ts
84
+ * const exportWordConfig = {
85
+ * stylesheets: [
86
+ * './path/to/editor-styles.css',
87
+ * './path/to/custom-styles.css'
88
+ * ]
89
+ * }
90
+ * ```
91
+ *
92
+ * @default `[ 'EDITOR_STYLES' ]`
93
+ */
94
+ stylesheets?: Array<string>;
95
+ /**
96
+ * The name of the generated Word file.
97
+ *
98
+ * ```ts
99
+ * // Static file name.
100
+ * const exportWordConfig = {
101
+ * fileName: 'my-document.docx'
102
+ * }
103
+ *
104
+ *
105
+ * // Dynamic file name.
106
+ * const exportWordConfig = {
107
+ * fileName: () => {
108
+ * const articleTitle = document.querySelector( '#title' );
109
+ *
110
+ * return `${ articleTitle.value }.docx`;
111
+ * }
112
+ * }
113
+ * ```
114
+ *
115
+ * **NOTE:** The file name must contain the `.docx` extension.
116
+ * Otherwise your operating system or device may have trouble identifying the file type.
117
+ *
118
+ * @default 'document.docx'
119
+ */
120
+ fileName?: string | (() => string);
121
+ /**
122
+ * A URL to the Docx converter.
123
+ *
124
+ * ```ts
125
+ * const exportWordConfig = {
126
+ * converterUrl: 'https://myconverter.com/v2/'
127
+ * }
128
+ * ```
129
+ *
130
+ * **NOTE:** The plugin uses the default HTML to Word converter delivered by CKEditor Cloud Services.
131
+ * You can provide a URL to an on-premises converter instead.
132
+ *
133
+ * @default 'https://docx-converter.cke-cs.com/v2/convert/html-docx'
134
+ */
135
+ converterUrl?: string;
136
+ /**
137
+ * The CKEditor Cloud Services HTML to DOCX Converter [configuration options](https://docx-converter.cke-cs.com/docs#section/Options).
138
+ *
139
+ * **NOTE:** Configuring the plugin is not mandatory.
140
+ *
141
+ * ```ts
142
+ * const exportWordConfig = {
143
+ * converterOptions: {
144
+ * ...
145
+ * }
146
+ * }
147
+ * ```
148
+ *
149
+ * @default `{
150
+ * document: {
151
+ * size: 'A4',
152
+ * orientation: 'portrait',
153
+ * language: editor.locale.contentLanguage,
154
+ * margin: {
155
+ * top: '1in',
156
+ * bottom: '1in',
157
+ * right: '1in',
158
+ * left: '1in'
159
+ * }
160
+ * }
161
+ * headers: undefined,
162
+ * footers: undefined,
163
+ * auto_pagination: false,
164
+ * base_url: undefined,
165
+ * extra_http_headers: undefined
166
+ * }`
167
+ */
168
+ converterOptions?: ExportWordConverterOptions | ExportWordConverterOptionsV2;
169
+ /**
170
+ * A function to gather the HTML to be converted to Word.
171
+ *
172
+ * **NOTE:** This option may be useful when the editor does not have a `getData()` method,
173
+ * or if the HTML to be converted should be different than the edited one.
174
+ *
175
+ * ```ts
176
+ * const exportWordConfig = {
177
+ * dataCallback: ( editor ) => {
178
+ * return `
179
+ * <header id="header">${ editor.data.get( { rootName: 'header' } ) }</header>
180
+ * <div id="content">${ editor.data.get( { rootName: 'content' } ) }</div>
181
+ * `;
182
+ * }
183
+ * }
184
+ * ```
185
+ *
186
+ * @default `( editor ) => editor.getData( { pagination: true } )
187
+ *
188
+ * If using the {@glink features/pagination/pagination pagination} feature, the `pagination:true` option inserts additional markers into
189
+ * editor's data. Thanks to that, the Docx converter creates a Word document similar to what is displayed in the editor.
190
+ */
191
+ dataCallback?: (editor: Editor) => string;
192
+ /**
193
+ * A token URL or a token request function. This field is optional and should be used only when a different `tokenUrl` is required for
194
+ * the export to Word feature.
195
+ *
196
+ * **Note:** The token can be disabled with the `false` value provided.
197
+ *
198
+ * See: {@link module:cloud-services/cloudservicesconfig~CloudServicesConfig#tokenUrl}
199
+ */
200
+ tokenUrl?: TokenUrl | false;
201
+ /**
202
+ * The authentication token.
203
+ *
204
+ * See: {@link module:cloud-services/cloudservices~CloudServices#token}
205
+ */
206
+ token?: InitializedToken;
207
+ /**
208
+ * The version of `Export to Word` API.
209
+ *
210
+ * @default '2'
211
+ */
212
+ version?: 1 | 2;
213
+ /**
214
+ * The watermark configuration.
215
+ *
216
+ * ```ts
217
+ * converterOptions: {
218
+ * watermark: {
219
+ * source: 'https://placehold.co/200',
220
+ * width: '500px',
221
+ * height: '600px',
222
+ * washout: 'false'
223
+ * }
224
+ * }
225
+ * ```
226
+ *
227
+ * The watermark configuration is represented as an object containing 4 properties:
228
+ *
229
+ * - `source`: A source of the image used for the watermark.
230
+ * - `width`: A string value representing the width of the watermark.
231
+ * - `height`: A string value representing the height of the watermark.
232
+ * - `washout`: Determines whether the washout effect should be applied. Optional - the default value is `false`.
233
+ *
234
+ */
235
+ watermark?: ExportWordConverterWatermarkV2;
236
236
  }
237
237
  export type ExportWordConverterOptions = {
238
- format?: ExportWordConverterFormatOption;
239
- margin_top?: string;
240
- margin_bottom?: string;
241
- margin_right?: string;
242
- margin_left?: string;
243
- header?: ExportWordConverterHeaderFooterOption;
244
- footer?: ExportWordConverterHeaderFooterOption;
245
- comments?: ExportWordConverterCommentsOption;
246
- suggestions?: ExportWordConverterSuggestionsOption;
247
- orientation?: ExportWordConverterOrientationOption;
248
- auto_pagination?: boolean;
249
- base_url?: string;
238
+ format?: ExportWordConverterFormatOption;
239
+ margin_top?: string;
240
+ margin_bottom?: string;
241
+ margin_right?: string;
242
+ margin_left?: string;
243
+ header?: ExportWordConverterHeaderFooterOption;
244
+ footer?: ExportWordConverterHeaderFooterOption;
245
+ comments?: ExportWordConverterCommentsOption;
246
+ suggestions?: ExportWordConverterSuggestionsOption;
247
+ orientation?: ExportWordConverterOrientationOption;
248
+ auto_pagination?: boolean;
249
+ base_url?: string;
250
250
  };
251
- export type ExportWordConverterFormatOption = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
252
- export type ExportWordConverterOrientationOption = 'portrait' | 'landscape' | string & Record<never, never>;
251
+ export type ExportWordConverterFormatOption = "Letter" | "Legal" | "Tabloid" | "Statement" | "Executive" | "A3" | "A4" | "A5" | "A6" | "B4" | "B5" | string & Record<never, never>;
252
+ export type ExportWordConverterOrientationOption = "portrait" | "landscape" | string & Record<never, never>;
253
253
  export type ExportWordConverterHeaderFooterOption = Array<{
254
- html?: string;
255
- css?: string;
256
- type?: 'default' | 'even' | 'odd' | 'first' | string & Record<never, never>;
254
+ html?: string;
255
+ css?: string;
256
+ type?: "default" | "even" | "odd" | "first" | string & Record<never, never>;
257
257
  }>;
258
258
  export type ExportWordConverterCommentsOption = {
259
- [id: string]: Array<{
260
- author: string;
261
- created: Date;
262
- content?: string;
263
- is_resolved: boolean;
264
- }>;
259
+ [id: string]: Array<{
260
+ author: string;
261
+ created: Date;
262
+ content?: string;
263
+ is_resolved: boolean;
264
+ }>;
265
265
  };
266
266
  export type ExportWordConverterSuggestionsOption = {
267
- [id: string]: {
268
- author: string;
269
- created: Date | null;
270
- };
267
+ [id: string]: {
268
+ author: string;
269
+ created: Date | null;
270
+ };
271
271
  };
272
272
  export type ExportWordConverterOptionsV2 = {
273
- document?: ExportWordConverterDocumentOptionsV2;
274
- headers?: ExportWordConverterHeaderFooterOptionsV2;
275
- footers?: ExportWordConverterHeaderFooterOptionsV2;
276
- extra_http_headers?: ExportWordConverterExtraHttpHeaders;
277
- base_url?: string;
278
- auto_pagination?: boolean;
279
- watermark?: ExportWordConverterWatermarkV2;
273
+ document?: ExportWordConverterDocumentOptionsV2;
274
+ headers?: ExportWordConverterHeaderFooterOptionsV2;
275
+ footers?: ExportWordConverterHeaderFooterOptionsV2;
276
+ extra_http_headers?: ExportWordConverterExtraHttpHeaders;
277
+ base_url?: string;
278
+ auto_pagination?: boolean;
279
+ watermark?: ExportWordConverterWatermarkV2;
280
280
  };
281
281
  export type ExportWordConverterDocumentOptionsV2 = {
282
- margins?: ExportWordConverterMarginsOptionsV2;
283
- size?: ExportWordConverterFormatOptionsV2;
284
- orientation?: ExportWordConverterOrientationOptionsV2;
285
- language?: string;
282
+ margins?: ExportWordConverterMarginsOptionsV2;
283
+ size?: ExportWordConverterFormatOptionsV2;
284
+ orientation?: ExportWordConverterOrientationOptionsV2;
285
+ language?: string;
286
286
  };
287
287
  export type ExportWordConverterMarginsOptionsV2 = {
288
- top?: string;
289
- right?: string;
290
- bottom?: string;
291
- left?: string;
288
+ top?: string;
289
+ right?: string;
290
+ bottom?: string;
291
+ left?: string;
292
292
  };
293
293
  export type ExportWordConverterHeaderFooterOptionsV2 = {
294
- first?: ExportWordConverterHeaderFooterItemOptionsV2;
295
- odd?: ExportWordConverterHeaderFooterItemOptionsV2;
296
- even?: ExportWordConverterHeaderFooterItemOptionsV2;
297
- default?: ExportWordConverterHeaderFooterItemOptionsV2;
294
+ first?: ExportWordConverterHeaderFooterItemOptionsV2;
295
+ odd?: ExportWordConverterHeaderFooterItemOptionsV2;
296
+ even?: ExportWordConverterHeaderFooterItemOptionsV2;
297
+ default?: ExportWordConverterHeaderFooterItemOptionsV2;
298
298
  };
299
299
  export type ExportWordConverterWatermarkV2 = {
300
- source?: string;
301
- width?: string;
302
- height?: string;
303
- washout?: boolean;
300
+ source?: string;
301
+ width?: string;
302
+ height?: string;
303
+ washout?: boolean;
304
304
  };
305
305
  /**
306
- * If fetching some resources (e.g. images) used in a generated Word requires passing an additional
307
- * authorization factor in the form of additional HTTP headers:
308
- *
309
- * ```
310
- * extra_http_headers: {
311
- * 'https://ckeditor.com': {
312
- * authorization: 'Bearer xxx'
313
- * },
314
- * 'https://example.com': {
315
- * authorization: 'Bearer xxx'
316
- * },
317
- * }
318
- * ```
319
- */
306
+ * If fetching some resources (e.g. images) used in a generated Word requires passing an additional
307
+ * authorization factor in the form of additional HTTP headers:
308
+ *
309
+ * ```
310
+ * extra_http_headers: {
311
+ * 'https://ckeditor.com': {
312
+ * authorization: 'Bearer xxx'
313
+ * },
314
+ * 'https://example.com': {
315
+ * authorization: 'Bearer xxx'
316
+ * },
317
+ * }
318
+ * ```
319
+ */
320
320
  export type ExportWordConverterExtraHttpHeaders = {
321
- [domain: string]: ExportWordConverterExtraHttpHeadersHeader;
321
+ [domain: string]: ExportWordConverterExtraHttpHeadersHeader;
322
322
  };
323
323
  export type ExportWordConverterExtraHttpHeadersHeader = {
324
- [header: string]: string;
324
+ [header: string]: string;
325
325
  };
326
326
  export type ExportWordConverterHeaderFooterItemOptionsV2 = {
327
- html?: string;
328
- css?: string;
327
+ html?: string;
328
+ css?: string;
329
329
  };
330
- export type ExportWordConverterOrientationOptionsV2 = 'portrait' | 'landscape' | string & Record<never, never>;
330
+ export type ExportWordConverterOrientationOptionsV2 = "portrait" | "landscape" | string & Record<never, never>;
331
331
  export type ExportWordConverterFormatOptionsV2 = ExportWordConverterPredifinedFormatOptionsV2 | ExportWordConverterCustomFormatOptionsV2;
332
- export type ExportWordConverterPredifinedFormatOptionsV2 = 'Letter' | 'Legal' | 'Tabloid' | 'Statement' | 'Executive' | 'A3' | 'A4' | 'A5' | 'A6' | 'B4' | 'B5' | string & Record<never, never>;
332
+ export type ExportWordConverterPredifinedFormatOptionsV2 = "Letter" | "Legal" | "Tabloid" | "Statement" | "Executive" | "A3" | "A4" | "A5" | "A6" | "B4" | "B5" | string & Record<never, never>;
333
333
  export type ExportWordConverterCustomFormatOptionsV2 = {
334
- width?: string;
335
- height?: string;
334
+ width?: string;
335
+ height?: string;
336
336
  };
337
337
  export type ExportWordConverterCollaborationFeaturesOptionsV2 = {
338
- comment_threads?: ExportWordConverterCommentsThreadOptionsV2;
339
- suggestions?: ExportWordConverterSuggestionsOptionsV2;
338
+ comment_threads?: ExportWordConverterCommentsThreadOptionsV2;
339
+ suggestions?: ExportWordConverterSuggestionsOptionsV2;
340
340
  };
341
341
  export type ExportWordConverterCommentsThreadOptionsV2 = Array<{
342
- thread_id: string;
343
- is_resolved: boolean;
344
- comments: ExportWordConverterCommentsV2;
342
+ thread_id: string;
343
+ is_resolved: boolean;
344
+ comments: ExportWordConverterCommentsV2;
345
345
  }>;
346
346
  export type ExportWordConverterCommentsV2 = Array<{
347
- author: string;
348
- created_at: Date;
349
- content: string;
347
+ author: string;
348
+ created_at: Date;
349
+ content: string;
350
350
  }>;
351
351
  export type ExportWordConverterSuggestionsOptionsV2 = Array<{
352
- id: string;
353
- author: string;
354
- created_at: Date | null;
352
+ id: string;
353
+ author: string;
354
+ created_at: Date | null;
355
355
  }>;
356
356
  export type ExportWordConverterMergeFieldsOptionsV2 = {
357
- prefix: string;
358
- suffix: string;
359
- data?: Record<string, string>;
357
+ prefix: string;
358
+ suffix: string;
359
+ data?: Record<string, string>;
360
360
  };