@ckeditor/ckeditor5-slash-command 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 (158) hide show
  1. package/dist/augmentation.d.ts +19 -19
  2. package/dist/index.d.ts +12 -12
  3. package/dist/index.js +1 -1
  4. package/dist/legacyerrors.d.ts +0 -4
  5. package/dist/slashcommand.d.ts +33 -33
  6. package/dist/slashcommandconfig.d.ts +248 -248
  7. package/dist/slashcommandediting.d.ts +31 -31
  8. package/dist/slashcommandeditorconfig.d.ts +91 -91
  9. package/dist/slashcommandui.d.ts +36 -36
  10. package/dist/translations/af.js +1 -1
  11. package/dist/translations/af.umd.js +1 -1
  12. package/dist/translations/ar.js +1 -1
  13. package/dist/translations/ar.umd.js +1 -1
  14. package/dist/translations/ast.js +1 -1
  15. package/dist/translations/ast.umd.js +1 -1
  16. package/dist/translations/az.js +1 -1
  17. package/dist/translations/az.umd.js +1 -1
  18. package/dist/translations/be.js +1 -1
  19. package/dist/translations/be.umd.js +1 -1
  20. package/dist/translations/bg.js +1 -1
  21. package/dist/translations/bg.umd.js +1 -1
  22. package/dist/translations/bn.js +1 -1
  23. package/dist/translations/bn.umd.js +1 -1
  24. package/dist/translations/bs.js +1 -1
  25. package/dist/translations/bs.umd.js +1 -1
  26. package/dist/translations/ca.js +1 -1
  27. package/dist/translations/ca.umd.js +1 -1
  28. package/dist/translations/cs.js +1 -1
  29. package/dist/translations/cs.umd.js +1 -1
  30. package/dist/translations/da.js +1 -1
  31. package/dist/translations/da.umd.js +1 -1
  32. package/dist/translations/de-ch.js +1 -1
  33. package/dist/translations/de-ch.umd.js +1 -1
  34. package/dist/translations/de.js +1 -1
  35. package/dist/translations/de.umd.js +1 -1
  36. package/dist/translations/el.js +1 -1
  37. package/dist/translations/el.umd.js +1 -1
  38. package/dist/translations/en-au.js +1 -1
  39. package/dist/translations/en-au.umd.js +1 -1
  40. package/dist/translations/en-gb.js +1 -1
  41. package/dist/translations/en-gb.umd.js +1 -1
  42. package/dist/translations/en.js +1 -1
  43. package/dist/translations/en.umd.js +1 -1
  44. package/dist/translations/eo.js +1 -1
  45. package/dist/translations/eo.umd.js +1 -1
  46. package/dist/translations/es-co.js +1 -1
  47. package/dist/translations/es-co.umd.js +1 -1
  48. package/dist/translations/es.js +1 -1
  49. package/dist/translations/es.umd.js +1 -1
  50. package/dist/translations/et.js +1 -1
  51. package/dist/translations/et.umd.js +1 -1
  52. package/dist/translations/eu.js +1 -1
  53. package/dist/translations/eu.umd.js +1 -1
  54. package/dist/translations/fa.js +1 -1
  55. package/dist/translations/fa.umd.js +1 -1
  56. package/dist/translations/fi.js +1 -1
  57. package/dist/translations/fi.umd.js +1 -1
  58. package/dist/translations/fr.js +1 -1
  59. package/dist/translations/fr.umd.js +1 -1
  60. package/dist/translations/gl.js +1 -1
  61. package/dist/translations/gl.umd.js +1 -1
  62. package/dist/translations/gu.js +1 -1
  63. package/dist/translations/gu.umd.js +1 -1
  64. package/dist/translations/he.js +1 -1
  65. package/dist/translations/he.umd.js +1 -1
  66. package/dist/translations/hi.js +1 -1
  67. package/dist/translations/hi.umd.js +1 -1
  68. package/dist/translations/hr.js +1 -1
  69. package/dist/translations/hr.umd.js +1 -1
  70. package/dist/translations/hu.js +1 -1
  71. package/dist/translations/hu.umd.js +1 -1
  72. package/dist/translations/hy.js +1 -1
  73. package/dist/translations/hy.umd.js +1 -1
  74. package/dist/translations/id.js +1 -1
  75. package/dist/translations/id.umd.js +1 -1
  76. package/dist/translations/it.js +1 -1
  77. package/dist/translations/it.umd.js +1 -1
  78. package/dist/translations/ja.js +1 -1
  79. package/dist/translations/ja.umd.js +1 -1
  80. package/dist/translations/jv.js +1 -1
  81. package/dist/translations/jv.umd.js +1 -1
  82. package/dist/translations/kk.js +1 -1
  83. package/dist/translations/kk.umd.js +1 -1
  84. package/dist/translations/km.js +1 -1
  85. package/dist/translations/km.umd.js +1 -1
  86. package/dist/translations/kn.js +1 -1
  87. package/dist/translations/kn.umd.js +1 -1
  88. package/dist/translations/ko.js +1 -1
  89. package/dist/translations/ko.umd.js +1 -1
  90. package/dist/translations/ku.js +1 -1
  91. package/dist/translations/ku.umd.js +1 -1
  92. package/dist/translations/lt.js +1 -1
  93. package/dist/translations/lt.umd.js +1 -1
  94. package/dist/translations/lv.js +1 -1
  95. package/dist/translations/lv.umd.js +1 -1
  96. package/dist/translations/ms.js +1 -1
  97. package/dist/translations/ms.umd.js +1 -1
  98. package/dist/translations/nb.js +1 -1
  99. package/dist/translations/nb.umd.js +1 -1
  100. package/dist/translations/ne.js +1 -1
  101. package/dist/translations/ne.umd.js +1 -1
  102. package/dist/translations/nl.js +1 -1
  103. package/dist/translations/nl.umd.js +1 -1
  104. package/dist/translations/no.js +1 -1
  105. package/dist/translations/no.umd.js +1 -1
  106. package/dist/translations/oc.js +1 -1
  107. package/dist/translations/oc.umd.js +1 -1
  108. package/dist/translations/pl.js +1 -1
  109. package/dist/translations/pl.umd.js +1 -1
  110. package/dist/translations/pt-br.js +1 -1
  111. package/dist/translations/pt-br.umd.js +1 -1
  112. package/dist/translations/pt.js +1 -1
  113. package/dist/translations/pt.umd.js +1 -1
  114. package/dist/translations/ro.js +1 -1
  115. package/dist/translations/ro.umd.js +1 -1
  116. package/dist/translations/ru.js +1 -1
  117. package/dist/translations/ru.umd.js +1 -1
  118. package/dist/translations/si.js +1 -1
  119. package/dist/translations/si.umd.js +1 -1
  120. package/dist/translations/sk.js +1 -1
  121. package/dist/translations/sk.umd.js +1 -1
  122. package/dist/translations/sl.js +1 -1
  123. package/dist/translations/sl.umd.js +1 -1
  124. package/dist/translations/sq.js +1 -1
  125. package/dist/translations/sq.umd.js +1 -1
  126. package/dist/translations/sr-latn.js +1 -1
  127. package/dist/translations/sr-latn.umd.js +1 -1
  128. package/dist/translations/sr.js +1 -1
  129. package/dist/translations/sr.umd.js +1 -1
  130. package/dist/translations/sv.js +1 -1
  131. package/dist/translations/sv.umd.js +1 -1
  132. package/dist/translations/th.js +1 -1
  133. package/dist/translations/th.umd.js +1 -1
  134. package/dist/translations/ti.js +1 -1
  135. package/dist/translations/ti.umd.js +1 -1
  136. package/dist/translations/tk.js +1 -1
  137. package/dist/translations/tk.umd.js +1 -1
  138. package/dist/translations/tr.js +1 -1
  139. package/dist/translations/tr.umd.js +1 -1
  140. package/dist/translations/tt.js +1 -1
  141. package/dist/translations/tt.umd.js +1 -1
  142. package/dist/translations/ug.js +1 -1
  143. package/dist/translations/ug.umd.js +1 -1
  144. package/dist/translations/uk.js +1 -1
  145. package/dist/translations/uk.umd.js +1 -1
  146. package/dist/translations/ur.js +1 -1
  147. package/dist/translations/ur.umd.js +1 -1
  148. package/dist/translations/uz.js +1 -1
  149. package/dist/translations/uz.umd.js +1 -1
  150. package/dist/translations/vi.js +1 -1
  151. package/dist/translations/vi.umd.js +1 -1
  152. package/dist/translations/zh-cn.js +1 -1
  153. package/dist/translations/zh-cn.umd.js +1 -1
  154. package/dist/translations/zh.js +1 -1
  155. package/dist/translations/zh.umd.js +1 -1
  156. package/dist/ui/slashcommandbuttonview.d.ts +26 -26
  157. package/dist/utils/common-translations.d.ts +6 -6
  158. package/package.json +9 -9
@@ -1,256 +1,256 @@
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 slash-command/slashcommandconfig
7
- * @publicApi
8
- */
9
- import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
10
- import './slashcommandeditorconfig.js';
6
+ * @module slash-command/slashcommandconfig
7
+ * @publicApi
8
+ */
9
+ import { Plugin, type Editor } from "@ckeditor/ckeditor5-core";
10
+ import "./slashcommandeditorconfig.js";
11
11
  /**
12
- * This plugin takes care of the configuration for {@link module:slash-command/slashcommand~SlashCommand}:
13
- *
14
- * * It manages the configuration of slash commands in the editor.
15
- * * It provides default slash commands for common editor features.
16
- * * It allows defining extra commands and reducing the list of defaults using the editor configuration.
17
- * See {@link module:slash-command/slashcommandconfig~SlashCommandConfig} to learn more.
18
- *
19
- * @extends module:core/plugin~Plugin
20
- */
12
+ * This plugin takes care of the configuration for {@link module:slash-command/slashcommand~SlashCommand}:
13
+ *
14
+ * * It manages the configuration of slash commands in the editor.
15
+ * * It provides default slash commands for common editor features.
16
+ * * It allows defining extra commands and reducing the list of defaults using the editor configuration.
17
+ * See {@link module:slash-command/slashcommandconfig~SlashCommandConfig} to learn more.
18
+ *
19
+ * @extends module:core/plugin~Plugin
20
+ */
21
21
  export declare class SlashCommandConfig extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "SlashCommandConfig";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
30
- /**
31
- * @inheritDoc
32
- */
33
- static get isPremiumPlugin(): true;
34
- /**
35
- * @inheritDoc
36
- */
37
- constructor(editor: Editor);
38
- /**
39
- * @inheritDoc
40
- */
41
- afterInit(): void;
42
- /**
43
- * Returns an array of slash command definitions enabled in the editor.
44
- *
45
- * This method takes into account the following:
46
- * * The {@link module:slash-command/slashcommandconfig~SlashCommandConfig#getDefaultCommands list of default commands}.
47
- * * The presence of {@link module:core/editor/editorconfig~EditorConfig#plugins editor features} (plugins).
48
- * * The {@link module:slash-command/slashcommandeditorconfig~SlashCommandEditorConfig#removeCommands} configuration.
49
- * * The {@link module:slash-command/slashcommandeditorconfig~SlashCommandEditorConfig#extraCommands} configuration.
50
- */
51
- getAllowedCommands(): Array<SlashCommandDefinition>;
52
- /**
53
- * Returns a list of default slash command {@link module:slash-command/slashcommandconfig~SlashCommandDefinition definitions}
54
- * for common editor features. The available definitions are as follows:
55
- *
56
- * ```js
57
- * [
58
- * {
59
- * id: 'blockQuote',
60
- * commandName: 'blockQuote',
61
- * title: t( 'Block quote' ),
62
- * // ...
63
- * },
64
- * {
65
- * id: 'bulletedList',
66
- * commandName: 'bulletedList',
67
- * title: t( 'Bulleted List' ),
68
- * // ...
69
- * },
70
- * {
71
- * id: 'codeBlock',
72
- * commandName: 'codeBlock',
73
- * title: t( 'Insert code block' ),
74
- * // ...
75
- * },
76
- * {
77
- * id: 'ckbox',
78
- * commandName: 'ckbox',
79
- * title: t( 'Open file manager' ),
80
- * // ...
81
- * },
82
- * {
83
- * id: 'ckfinder',
84
- * commandName: 'ckfinder',
85
- * title: t( 'Insert image' ),
86
- * // ...
87
- * },
88
- * {
89
- * id: 'heading1',
90
- * commandName: 'heading',
91
- * title: t( 'Heading 1' ),
92
- * // ...
93
- * },
94
- * {
95
- * id: 'heading2',
96
- * commandName: 'heading',
97
- * title: t( 'Heading 2' ),
98
- * // ...
99
- * },
100
- * {
101
- * id: 'heading3',
102
- * commandName: 'heading',
103
- * title: t( 'Heading 3' ),
104
- * // ...
105
- * },
106
- * {
107
- * id: 'heading4',
108
- * commandName: 'heading',
109
- * title: t( 'Heading 4' ),
110
- * // ...
111
- * },
112
- * {
113
- * id: 'heading5',
114
- * commandName: 'heading',
115
- * title: t( 'Heading 5' ),
116
- * // ...
117
- * },
118
- * {
119
- * id: 'heading6',
120
- * commandName: 'heading',
121
- * title: t( 'Heading 6' ),
122
- * // ...
123
- * },
124
- * {
125
- * id: 'horizontalLine',
126
- * commandName: 'horizontalLine',
127
- * title: t( 'Horizontal line' ),
128
- * // ...
129
- * },
130
- * {
131
- * id: 'htmlEmbed',
132
- * commandName: 'htmlEmbed',
133
- * title: t( 'Insert HTML' ),
134
- * // ...
135
- * },
136
- * {
137
- * id: 'indent',
138
- * commandName: 'indent',
139
- * title: t( 'Increase indent' ),
140
- * // ...
141
- * },
142
- * {
143
- * id: 'insertMermaidCommand',
144
- * commandName: 'insertMermaidCommand',
145
- * title: t( 'Insert Mermaid diagram' ),
146
- * // ...
147
- * },
148
- * {
149
- * id: 'insertTable',
150
- * commandName: 'insertTable',
151
- * title: t( 'Insert table' ),
152
- * // ...
153
- * },
154
- * {
155
- * id: 'insertTableOfContents',
156
- * commandName: 'insertTableOfContents',
157
- * title: t( 'Table of contents' ),
158
- * // ...
159
- * },
160
- * {
161
- * id: 'numberedList',
162
- * commandName: 'numberedList',
163
- * title: t( 'Numbered List' ),
164
- * // ...
165
- * },
166
- * {
167
- * id: 'outdent',
168
- * commandName: 'outdent',
169
- * title: t( 'Decrease indent' ),
170
- * // ...
171
- * },
172
- * {
173
- * id: 'paragraph',
174
- * commandName: 'paragraph',
175
- * title: t( 'Paragraph' ),
176
- * // ...
177
- * },
178
- * {
179
- * id: 'todoList',
180
- * commandName: 'todoList',
181
- * title: t( 'To-do List' ),
182
- * // ...
183
- * },
184
- * {
185
- * id: 'footnote',
186
- * commandName: 'insertFootnote',
187
- * title: t( 'Footnote' ),
188
- * // ...
189
- * }
190
- * ]
191
- */
192
- getDefaultCommands(): Array<SlashCommandDefinition>;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "SlashCommandConfig";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static override get isOfficialPlugin(): true;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static override get isPremiumPlugin(): true;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ constructor(editor: Editor);
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ afterInit(): void;
42
+ /**
43
+ * Returns an array of slash command definitions enabled in the editor.
44
+ *
45
+ * This method takes into account the following:
46
+ * * The {@link module:slash-command/slashcommandconfig~SlashCommandConfig#getDefaultCommands list of default commands}.
47
+ * * The presence of {@link module:core/editor/editorconfig~EditorConfig#plugins editor features} (plugins).
48
+ * * The {@link module:slash-command/slashcommandeditorconfig~SlashCommandEditorConfig#removeCommands} configuration.
49
+ * * The {@link module:slash-command/slashcommandeditorconfig~SlashCommandEditorConfig#extraCommands} configuration.
50
+ */
51
+ getAllowedCommands(): Array<SlashCommandDefinition>;
52
+ /**
53
+ * Returns a list of default slash command {@link module:slash-command/slashcommandconfig~SlashCommandDefinition definitions}
54
+ * for common editor features. The available definitions are as follows:
55
+ *
56
+ * ```js
57
+ * [
58
+ * {
59
+ * id: 'blockQuote',
60
+ * commandName: 'blockQuote',
61
+ * title: t( 'Block quote' ),
62
+ * // ...
63
+ * },
64
+ * {
65
+ * id: 'bulletedList',
66
+ * commandName: 'bulletedList',
67
+ * title: t( 'Bulleted List' ),
68
+ * // ...
69
+ * },
70
+ * {
71
+ * id: 'codeBlock',
72
+ * commandName: 'codeBlock',
73
+ * title: t( 'Insert code block' ),
74
+ * // ...
75
+ * },
76
+ * {
77
+ * id: 'ckbox',
78
+ * commandName: 'ckbox',
79
+ * title: t( 'Open file manager' ),
80
+ * // ...
81
+ * },
82
+ * {
83
+ * id: 'ckfinder',
84
+ * commandName: 'ckfinder',
85
+ * title: t( 'Insert image' ),
86
+ * // ...
87
+ * },
88
+ * {
89
+ * id: 'heading1',
90
+ * commandName: 'heading',
91
+ * title: t( 'Heading 1' ),
92
+ * // ...
93
+ * },
94
+ * {
95
+ * id: 'heading2',
96
+ * commandName: 'heading',
97
+ * title: t( 'Heading 2' ),
98
+ * // ...
99
+ * },
100
+ * {
101
+ * id: 'heading3',
102
+ * commandName: 'heading',
103
+ * title: t( 'Heading 3' ),
104
+ * // ...
105
+ * },
106
+ * {
107
+ * id: 'heading4',
108
+ * commandName: 'heading',
109
+ * title: t( 'Heading 4' ),
110
+ * // ...
111
+ * },
112
+ * {
113
+ * id: 'heading5',
114
+ * commandName: 'heading',
115
+ * title: t( 'Heading 5' ),
116
+ * // ...
117
+ * },
118
+ * {
119
+ * id: 'heading6',
120
+ * commandName: 'heading',
121
+ * title: t( 'Heading 6' ),
122
+ * // ...
123
+ * },
124
+ * {
125
+ * id: 'horizontalLine',
126
+ * commandName: 'horizontalLine',
127
+ * title: t( 'Horizontal line' ),
128
+ * // ...
129
+ * },
130
+ * {
131
+ * id: 'htmlEmbed',
132
+ * commandName: 'htmlEmbed',
133
+ * title: t( 'Insert HTML' ),
134
+ * // ...
135
+ * },
136
+ * {
137
+ * id: 'indent',
138
+ * commandName: 'indent',
139
+ * title: t( 'Increase indent' ),
140
+ * // ...
141
+ * },
142
+ * {
143
+ * id: 'insertMermaidCommand',
144
+ * commandName: 'insertMermaidCommand',
145
+ * title: t( 'Insert Mermaid diagram' ),
146
+ * // ...
147
+ * },
148
+ * {
149
+ * id: 'insertTable',
150
+ * commandName: 'insertTable',
151
+ * title: t( 'Insert table' ),
152
+ * // ...
153
+ * },
154
+ * {
155
+ * id: 'insertTableOfContents',
156
+ * commandName: 'insertTableOfContents',
157
+ * title: t( 'Table of contents' ),
158
+ * // ...
159
+ * },
160
+ * {
161
+ * id: 'numberedList',
162
+ * commandName: 'numberedList',
163
+ * title: t( 'Numbered List' ),
164
+ * // ...
165
+ * },
166
+ * {
167
+ * id: 'outdent',
168
+ * commandName: 'outdent',
169
+ * title: t( 'Decrease indent' ),
170
+ * // ...
171
+ * },
172
+ * {
173
+ * id: 'paragraph',
174
+ * commandName: 'paragraph',
175
+ * title: t( 'Paragraph' ),
176
+ * // ...
177
+ * },
178
+ * {
179
+ * id: 'todoList',
180
+ * commandName: 'todoList',
181
+ * title: t( 'To-do List' ),
182
+ * // ...
183
+ * },
184
+ * {
185
+ * id: 'footnote',
186
+ * commandName: 'insertFootnote',
187
+ * title: t( 'Footnote' ),
188
+ * // ...
189
+ * }
190
+ * ]
191
+ */
192
+ getDefaultCommands(): Array<SlashCommandDefinition>;
193
193
  }
194
194
  /**
195
- * An object describing a single command definition in the configuration.
196
- */
195
+ * An object describing a single command definition in the configuration.
196
+ */
197
197
  export interface SlashCommandDefinition {
198
- /**
199
- * A unique ID matched with the text that follows the slash ("/") character typed by the user,
200
- * e.g. 'blockQuote', 'heading1'. See {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#aliases}
201
- * to learn about slash command aliases that provide a similar functionality.
202
- */
203
- id: string;
204
- /**
205
- * The name of the command to be executed if the `execute` property was not provided,
206
- * for example, 'blockQuote', 'heading'. See {@link module:core/editor/editor~Editor#commands} to learn more about available commands.
207
- */
208
- commandName?: string;
209
- /**
210
- * A meaningful title for the command displayed in a dropdown list of possible commands. It can be a string
211
- * or a callback function returning a string.
212
- */
213
- title: Function | string;
214
- /**
215
- * An optional description for the command. Useful when the title is not descriptive enough.
216
- */
217
- description?: string;
218
- /**
219
- * An SVG string representing the icon of the command. If not provided, a generic icon will be used instead.
220
- * The default size of the icon is 20x20 pixels. Be sure to set the correct `viewBox` attribute in the icon source.
221
- *
222
- * See {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#isIconColorInherited}.
223
- */
224
- icon?: string;
225
- /**
226
- * By default, slash command icons are monochromatic and inherit the color of the text in the editor UI.
227
- * Setting this property to `false` disables this inheritance and allows the use of complex (colorful) icons.
228
- *
229
- * Learn more in {@link module:ui/icon/iconview~IconView#isColorInherited}.
230
- */
231
- isIconColorInherited?: boolean;
232
- /**
233
- * An optional list of aliases (extending the base
234
- * {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#id}) to be used when filtering the list of slash commands
235
- * based on the text that follows the slash ("/") character.
236
- */
237
- aliases?: Array<string>;
238
- /**
239
- * A callback function defining custom logic to decide if the command should be displayed
240
- * in the dropdown list. If not provided, the default command's {@link module:core/command~Command#isEnabled} property is used instead.
241
- * If it's also unavailable, it falls back to `true`. This property is checked when a user types the slash ("/") character
242
- * or changes the text that follows it.
243
- *
244
- * This callback gets an {@link module:core/editor/editor~Editor} instance as a parameter.
245
- */
246
- isEnabled?: Function;
247
- /**
248
- * A callback function defining custom logic for executing the command. If not provided, the default
249
- * command's {@link module:core/command~Command#execute} is used instead. Custom logic is useful especially when the slash command
250
- * requires some arguments (acts like a wrapper) or combines some complex logic. This property is obligatory if
251
- * {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#commandName} was not passed.
252
- *
253
- * This callback gets an {@link module:core/editor/editor~Editor} instance as a parameter.
254
- */
255
- execute?: Function;
198
+ /**
199
+ * A unique ID matched with the text that follows the slash ("/") character typed by the user,
200
+ * e.g. 'blockQuote', 'heading1'. See {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#aliases}
201
+ * to learn about slash command aliases that provide a similar functionality.
202
+ */
203
+ id: string;
204
+ /**
205
+ * The name of the command to be executed if the `execute` property was not provided,
206
+ * for example, 'blockQuote', 'heading'. See {@link module:core/editor/editor~Editor#commands} to learn more about available commands.
207
+ */
208
+ commandName?: string;
209
+ /**
210
+ * A meaningful title for the command displayed in a dropdown list of possible commands. It can be a string
211
+ * or a callback function returning a string.
212
+ */
213
+ title: Function | string;
214
+ /**
215
+ * An optional description for the command. Useful when the title is not descriptive enough.
216
+ */
217
+ description?: string;
218
+ /**
219
+ * An SVG string representing the icon of the command. If not provided, a generic icon will be used instead.
220
+ * The default size of the icon is 20x20 pixels. Be sure to set the correct `viewBox` attribute in the icon source.
221
+ *
222
+ * See {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#isIconColorInherited}.
223
+ */
224
+ icon?: string;
225
+ /**
226
+ * By default, slash command icons are monochromatic and inherit the color of the text in the editor UI.
227
+ * Setting this property to `false` disables this inheritance and allows the use of complex (colorful) icons.
228
+ *
229
+ * Learn more in {@link module:ui/icon/iconview~IconView#isColorInherited}.
230
+ */
231
+ isIconColorInherited?: boolean;
232
+ /**
233
+ * An optional list of aliases (extending the base
234
+ * {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#id}) to be used when filtering the list of slash commands
235
+ * based on the text that follows the slash ("/") character.
236
+ */
237
+ aliases?: Array<string>;
238
+ /**
239
+ * A callback function defining custom logic to decide if the command should be displayed
240
+ * in the dropdown list. If not provided, the default command's {@link module:core/command~Command#isEnabled} property is used instead.
241
+ * If it's also unavailable, it falls back to `true`. This property is checked when a user types the slash ("/") character
242
+ * or changes the text that follows it.
243
+ *
244
+ * This callback gets an {@link module:core/editor/editor~Editor} instance as a parameter.
245
+ */
246
+ isEnabled?: Function;
247
+ /**
248
+ * A callback function defining custom logic for executing the command. If not provided, the default
249
+ * command's {@link module:core/command~Command#execute} is used instead. Custom logic is useful especially when the slash command
250
+ * requires some arguments (acts like a wrapper) or combines some complex logic. This property is obligatory if
251
+ * {@link module:slash-command/slashcommandconfig~SlashCommandDefinition#commandName} was not passed.
252
+ *
253
+ * This callback gets an {@link module:core/editor/editor~Editor} instance as a parameter.
254
+ */
255
+ execute?: Function;
256
256
  }
@@ -1,36 +1,36 @@
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 slash-command/slashcommandediting
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { SlashCommandConfig, type SlashCommandDefinition } from './slashcommandconfig.js';
6
+ * @module slash-command/slashcommandediting
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { SlashCommandConfig, type SlashCommandDefinition } from "./slashcommandconfig.js";
10
10
  /**
11
- * Provides the editing functionality of the {@link module:slash-command/slashcommand~SlashCommand} feature.
12
- *
13
- * @extends module:core/plugin~Plugin
14
- */
11
+ * Provides the editing functionality of the {@link module:slash-command/slashcommand~SlashCommand} feature.
12
+ *
13
+ * @extends module:core/plugin~Plugin
14
+ */
15
15
  export declare class SlashCommandEditing extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "SlashCommandEditing";
20
- /**
21
- * @inheritDoc
22
- */
23
- static get isOfficialPlugin(): true;
24
- /**
25
- * @inheritDoc
26
- */
27
- static get isPremiumPlugin(): true;
28
- /**
29
- * @inheritDoc
30
- */
31
- static get requires(): readonly [typeof SlashCommandConfig];
32
- /**
33
- * Returns the list of matching enabled command definitions for the specific query text case-insensitively.
34
- */
35
- getMatchingCommands(queryString: string): Array<SlashCommandDefinition>;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "SlashCommandEditing";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static override get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static override get isPremiumPlugin(): true;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get requires(): PluginDependenciesOf<[SlashCommandConfig]>;
32
+ /**
33
+ * Returns the list of matching enabled command definitions for the specific query text case-insensitively.
34
+ */
35
+ getMatchingCommands(queryString: string): Array<SlashCommandDefinition>;
36
36
  }