@ckeditor/ckeditor5-list 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.
- package/dist/augmentation.d.ts +54 -54
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +67 -67
- package/dist/index.js +7187 -8921
- package/dist/index.js.map +1 -1
- package/dist/legacyerrors.d.ts +0 -4
- package/dist/legacylist/legacyconverters.d.ts +184 -184
- package/dist/legacylist/legacyindentcommand.d.ts +33 -33
- package/dist/legacylist/legacylistcommand.d.ts +52 -52
- package/dist/legacylist/legacylistediting.d.ts +32 -32
- package/dist/legacylist/legacylistutils.d.ts +40 -40
- package/dist/legacylist/legacyutils.d.ts +91 -91
- package/dist/legacylist.d.ts +25 -25
- package/dist/legacylistproperties/legacylistpropertiesediting.d.ts +71 -71
- package/dist/legacylistproperties/legacylistreversedcommand.d.ts +33 -33
- package/dist/legacylistproperties/legacyliststartcommand.d.ts +33 -33
- package/dist/legacylistproperties/legacyliststylecommand.d.ts +63 -63
- package/dist/legacylistproperties.d.ts +26 -26
- package/dist/legacytodolist/legacychecktodolistcommand.d.ts +47 -47
- package/dist/legacytodolist/legacytodolistconverters.d.ts +76 -76
- package/dist/legacytodolist/legacytodolistediting.d.ts +46 -46
- package/dist/legacytodolist.d.ts +26 -26
- package/dist/list/adjacentlistssupport.d.ts +16 -16
- package/dist/list/converters.d.ts +68 -68
- package/dist/list/listcommand.d.ts +84 -84
- package/dist/list/listediting.d.ts +213 -219
- package/dist/list/listindentcommand.d.ts +54 -54
- package/dist/list/listmergecommand.d.ts +68 -68
- package/dist/list/listsplitcommand.d.ts +59 -59
- package/dist/list/listui.d.ts +19 -19
- package/dist/list/listutils.d.ts +55 -55
- package/dist/list/utils/listwalker.d.ts +139 -139
- package/dist/list/utils/model.d.ts +202 -202
- package/dist/list/utils/postfixers.d.ts +30 -30
- package/dist/list/utils/view.d.ts +65 -65
- package/dist/list/utils.d.ts +15 -15
- package/dist/list.d.ts +25 -25
- package/dist/listconfig.d.ts +234 -234
- package/dist/listformatting/listitemboldintegration.d.ts +29 -29
- package/dist/listformatting/listitemfontcolorintegration.d.ts +29 -29
- package/dist/listformatting/listitemfontfamilyintegration.d.ts +29 -29
- package/dist/listformatting/listitemfontsizeintegration.d.ts +29 -29
- package/dist/listformatting/listitemitalicintegration.d.ts +29 -29
- package/dist/listformatting.d.ts +66 -66
- package/dist/listproperties/converters.d.ts +15 -15
- package/dist/listproperties/listpropertiesediting.d.ts +91 -91
- package/dist/listproperties/listpropertiesui.d.ts +22 -22
- package/dist/listproperties/listpropertiesutils.d.ts +32 -32
- package/dist/listproperties/listreversedcommand.d.ts +31 -31
- package/dist/listproperties/liststartcommand.d.ts +34 -34
- package/dist/listproperties/liststylecommand.d.ts +67 -67
- package/dist/listproperties/ui/listpropertiesview.d.ts +147 -147
- package/dist/listproperties/utils/config.d.ts +32 -32
- package/dist/listproperties/utils/style.d.ts +31 -31
- package/dist/listproperties.d.ts +26 -26
- package/dist/todolist/checktodolistcommand.d.ts +44 -44
- package/dist/todolist/todocheckboxchangeobserver.d.ts +36 -36
- package/dist/todolist/todolistediting.d.ts +45 -45
- package/dist/todolist/todolistui.d.ts +19 -19
- package/dist/todolist.d.ts +26 -26
- package/package.json +10 -10
package/dist/legacyerrors.d.ts
CHANGED
|
@@ -1,212 +1,212 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { type DowncastAttributeEvent, type DowncastInsertEvent, type DowncastRemoveEvent, type ModelElement, type MapperModelToViewPositionEvent, type MapperViewToModelPositionEvent, type Model, type ModelInsertContentEvent, type UpcastElementEvent, type EditingView, type ModelWriter } from
|
|
9
|
-
import type { GetCallback } from
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
/**
|
|
6
|
+
* @module list/legacylist/legacyconverters
|
|
7
|
+
*/
|
|
8
|
+
import { type DowncastAttributeEvent, type DowncastInsertEvent, type DowncastRemoveEvent, type ModelElement, type MapperModelToViewPositionEvent, type MapperViewToModelPositionEvent, type Model, type ModelInsertContentEvent, type UpcastElementEvent, type EditingView, type ModelWriter } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import type { GetCallback } from "@ckeditor/ckeditor5-utils";
|
|
10
|
+
/**
|
|
11
|
+
* A model-to-view converter for the `listItem` model element insertion.
|
|
12
|
+
*
|
|
13
|
+
* It creates a `<ul><li></li><ul>` (or `<ol>`) view structure out of a `listItem` model element, inserts it at the correct
|
|
14
|
+
* position, and merges the list with surrounding lists (if available).
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert
|
|
18
|
+
* @param model Model instance.
|
|
19
|
+
*/
|
|
20
20
|
export declare function modelViewInsertion(model: Model): GetCallback<DowncastInsertEvent<ModelElement>>;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
* A model-to-view converter for the `listItem` model element removal.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove
|
|
26
|
+
* @param model Model instance.
|
|
27
|
+
* @returns Returns a conversion callback.
|
|
28
|
+
*/
|
|
29
29
|
export declare function modelViewRemove(model: Model): GetCallback<DowncastRemoveEvent>;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
* A model-to-view converter for the `type` attribute change on the `listItem` model element.
|
|
32
|
+
*
|
|
33
|
+
* This change means that the `<li>` element parent changes from `<ul>` to `<ol>` (or vice versa). This is accomplished
|
|
34
|
+
* by breaking view elements and changing their name. The next {@link module:list/legacylist/legacyconverters~modelViewMergeAfterChangeType}
|
|
35
|
+
* converter will attempt to merge split nodes.
|
|
36
|
+
*
|
|
37
|
+
* Splitting this conversion into 2 steps makes it possible to add an additional conversion in the middle.
|
|
38
|
+
* Check {@link module:list/legacytodolist/legacytodolistconverters~modelViewChangeType} to see an example of it.
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute
|
|
42
|
+
*/
|
|
43
43
|
export declare const modelViewChangeType: GetCallback<DowncastAttributeEvent<ModelElement>>;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
* A model-to-view converter that attempts to merge nodes split by {@link module:list/legacylist/legacyconverters~modelViewChangeType}.
|
|
46
|
+
*
|
|
47
|
+
* @internal
|
|
48
|
+
* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute
|
|
49
|
+
*/
|
|
50
50
|
export declare const modelViewMergeAfterChangeType: GetCallback<DowncastAttributeEvent<ModelElement>>;
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
* A model-to-view converter for the `listIndent` attribute change on the `listItem` model element.
|
|
53
|
+
*
|
|
54
|
+
* @internal
|
|
55
|
+
* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute
|
|
56
|
+
* @param model Model instance.
|
|
57
|
+
* @returns Returns a conversion callback.
|
|
58
|
+
*/
|
|
59
59
|
export declare function modelViewChangeIndent(model: Model): GetCallback<DowncastAttributeEvent<ModelElement>>;
|
|
60
60
|
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
61
|
+
* A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter is fired for
|
|
62
|
+
* insert change of every model item, and should be fired before the actual converter. The converter checks whether the inserted
|
|
63
|
+
* model item is a non-`listItem` element. If it is, and it is inserted inside a view list, the converter breaks the
|
|
64
|
+
* list so the model element is inserted to the view parent element corresponding to its model parent element.
|
|
65
|
+
*
|
|
66
|
+
* The converter prevents such situations:
|
|
67
|
+
*
|
|
68
|
+
* ```xml
|
|
69
|
+
* // Model: // View:
|
|
70
|
+
* <listItem>foo</listItem> <ul>
|
|
71
|
+
* <listItem>bar</listItem> <li>foo</li>
|
|
72
|
+
* <li>bar</li>
|
|
73
|
+
* </ul>
|
|
74
|
+
*
|
|
75
|
+
* // After change: // Correct view guaranteed by this converter:
|
|
76
|
+
* <listItem>foo</listItem> <ul><li>foo</li></ul><p>xxx</p><ul><li>bar</li></ul>
|
|
77
|
+
* <paragraph>xxx</paragraph> // Instead of this wrong view state:
|
|
78
|
+
* <listItem>bar</listItem> <ul><li>foo</li><p>xxx</p><li>bar</li></ul>
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:insert
|
|
83
|
+
*/
|
|
84
84
|
export declare const modelViewSplitOnInsert: GetCallback<DowncastInsertEvent<ModelElement>>;
|
|
85
85
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
* A special model-to-view converter introduced by the {@link module:list/legacylist~LegacyList list feature}. This converter takes care of
|
|
87
|
+
* merging view lists after something is removed or moved from near them.
|
|
88
|
+
*
|
|
89
|
+
* Example:
|
|
90
|
+
*
|
|
91
|
+
* ```xml
|
|
92
|
+
* // Model: // View:
|
|
93
|
+
* <listItem>foo</listItem> <ul><li>foo</li></ul>
|
|
94
|
+
* <paragraph>xxx</paragraph> <p>xxx</p>
|
|
95
|
+
* <listItem>bar</listItem> <ul><li>bar</li></ul>
|
|
96
|
+
*
|
|
97
|
+
* // After change: // Correct view guaranteed by this converter:
|
|
98
|
+
* <listItem>foo</listItem> <ul>
|
|
99
|
+
* <listItem>bar</listItem> <li>foo</li>
|
|
100
|
+
* <li>bar</li>
|
|
101
|
+
* </ul>
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @internal
|
|
105
|
+
* @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove
|
|
106
|
+
*/
|
|
107
107
|
export declare const modelViewMergeAfter: GetCallback<DowncastRemoveEvent>;
|
|
108
108
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
* A view-to-model converter that converts the `<li>` view elements into the `listItem` model elements.
|
|
110
|
+
*
|
|
111
|
+
* To set correct values of the `listType` and `listIndent` attributes the converter:
|
|
112
|
+
* * checks `<li>`'s parent,
|
|
113
|
+
* * stores and increases the `conversionApi.store.indent` value when `<li>`'s sub-items are converted.
|
|
114
|
+
*
|
|
115
|
+
* @internal
|
|
116
|
+
* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element
|
|
117
|
+
*/
|
|
118
118
|
export declare const viewModelConverter: GetCallback<UpcastElementEvent>;
|
|
119
119
|
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
* A view-to-model converter for the `<ul>` and `<ol>` view elements that cleans the input view of garbage.
|
|
121
|
+
* This is mostly to clean whitespaces from between the `<li>` view elements inside the view list element, however, also
|
|
122
|
+
* incorrect data can be cleared if the view was incorrect.
|
|
123
|
+
*
|
|
124
|
+
* @internal
|
|
125
|
+
* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element
|
|
126
|
+
*/
|
|
127
127
|
export declare const cleanList: GetCallback<UpcastElementEvent>;
|
|
128
128
|
/**
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
* A view-to-model converter for the `<li>` elements that cleans whitespace formatting from the input view.
|
|
130
|
+
*
|
|
131
|
+
* @internal
|
|
132
|
+
* @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element
|
|
133
|
+
*/
|
|
134
134
|
export declare const cleanListItem: GetCallback<UpcastElementEvent>;
|
|
135
135
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
* Returns a callback for model position to view position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes
|
|
137
|
+
* positions between the `listItem` elements that would be incorrectly mapped because of how list items are represented in the model
|
|
138
|
+
* and in the view.
|
|
139
|
+
*
|
|
140
|
+
* @internal
|
|
141
|
+
*/
|
|
142
142
|
export declare function modelToViewPosition(view: EditingView): GetCallback<MapperModelToViewPositionEvent>;
|
|
143
143
|
/**
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
* The callback for view position to model position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes
|
|
145
|
+
* positions between the `<li>` elements that would be incorrectly mapped because of how list items are represented in the model
|
|
146
|
+
* and in the view.
|
|
147
|
+
*
|
|
148
|
+
* @internal
|
|
149
|
+
* @see module:engine/conversion/mapper~Mapper#event:viewToModelPosition
|
|
150
|
+
* @param model Model instance.
|
|
151
|
+
* @returns Returns a conversion callback.
|
|
152
|
+
*/
|
|
153
153
|
export declare function viewToModelPosition(model: Model): GetCallback<MapperViewToModelPositionEvent>;
|
|
154
154
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
155
|
+
* Post-fixer that reacts to changes on document and fixes incorrect model states.
|
|
156
|
+
*
|
|
157
|
+
* In the example below, there is a correct list structure.
|
|
158
|
+
* Then the middle element is removed so the list structure will become incorrect:
|
|
159
|
+
*
|
|
160
|
+
* ```xml
|
|
161
|
+
* <listItem listType="bulleted" listIndent=0>Item 1</listItem>
|
|
162
|
+
* <listItem listType="bulleted" listIndent=1>Item 2</listItem> <--- this is removed.
|
|
163
|
+
* <listItem listType="bulleted" listIndent=2>Item 3</listItem>
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* The list structure after the middle element is removed:
|
|
167
|
+
*
|
|
168
|
+
* ```xml
|
|
169
|
+
* <listItem listType="bulleted" listIndent=0>Item 1</listItem>
|
|
170
|
+
* <listItem listType="bulleted" listIndent=2>Item 3</listItem>
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* Should become:
|
|
174
|
+
*
|
|
175
|
+
* ```xml
|
|
176
|
+
* <listItem listType="bulleted" listIndent=0>Item 1</listItem>
|
|
177
|
+
* <listItem listType="bulleted" listIndent=1>Item 3</listItem> <--- note that indent got post-fixed.
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @internal
|
|
181
|
+
* @param model The data model.
|
|
182
|
+
* @param writer The writer to do changes with.
|
|
183
|
+
* @returns `true` if any change has been applied, `false` otherwise.
|
|
184
|
+
*/
|
|
185
185
|
export declare function modelChangePostFixer(model: Model, writer: ModelWriter): boolean;
|
|
186
186
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
187
|
+
* A fixer for pasted content that includes list items.
|
|
188
|
+
*
|
|
189
|
+
* It fixes indentation of pasted list items so the pasted items match correctly to the context they are pasted into.
|
|
190
|
+
*
|
|
191
|
+
* Example:
|
|
192
|
+
*
|
|
193
|
+
* ```xml
|
|
194
|
+
* <listItem listType="bulleted" listIndent=0>A</listItem>
|
|
195
|
+
* <listItem listType="bulleted" listIndent=1>B^</listItem>
|
|
196
|
+
* // At ^ paste: <listItem listType="bulleted" listIndent=4>X</listItem>
|
|
197
|
+
* // <listItem listType="bulleted" listIndent=5>Y</listItem>
|
|
198
|
+
* <listItem listType="bulleted" listIndent=2>C</listItem>
|
|
199
|
+
* ```
|
|
200
|
+
*
|
|
201
|
+
* Should become:
|
|
202
|
+
*
|
|
203
|
+
* ```xml
|
|
204
|
+
* <listItem listType="bulleted" listIndent=0>A</listItem>
|
|
205
|
+
* <listItem listType="bulleted" listIndent=1>BX</listItem>
|
|
206
|
+
* <listItem listType="bulleted" listIndent=2>Y/listItem>
|
|
207
|
+
* <listItem listType="bulleted" listIndent=2>C</listItem>
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* @internal
|
|
211
|
+
*/
|
|
212
212
|
export declare const modelIndentPasteFixer: GetCallback<ModelInsertContentEvent>;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Command, type Editor } from
|
|
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 { Command, type Editor } from "@ckeditor/ckeditor5-core";
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
* The list indent command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.
|
|
8
|
+
*/
|
|
9
9
|
export declare class LegacyIndentCommand extends Command {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Determines by how much the command will change the list item's indent attribute.
|
|
12
|
+
*/
|
|
13
|
+
private readonly _indentBy;
|
|
14
|
+
/**
|
|
15
|
+
* Creates an instance of the command.
|
|
16
|
+
*
|
|
17
|
+
* @param editor The editor instance.
|
|
18
|
+
* @param indentDirection The direction of indent. If it is equal to `backward`, the command will outdent a list item.
|
|
19
|
+
*/
|
|
20
|
+
constructor(editor: Editor, indentDirection: "forward" | "backward");
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
override refresh(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.
|
|
27
|
+
*
|
|
28
|
+
* @fires execute
|
|
29
|
+
*/
|
|
30
|
+
override execute(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Checks whether the command can be enabled in the current context.
|
|
33
|
+
*
|
|
34
|
+
* @returns Whether the command should be enabled.
|
|
35
|
+
*/
|
|
36
|
+
private _checkEnabled;
|
|
37
37
|
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Command, type Editor } from
|
|
6
|
-
import { type ListType } from
|
|
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 { Command, type Editor } from "@ckeditor/ckeditor5-core";
|
|
6
|
+
import { type ListType } from "../list/listediting.js";
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
* The list command. It is used by the {@link module:list/legacylist~LegacyList legacy list feature}.
|
|
9
|
+
*/
|
|
10
10
|
export declare class LegacyListCommand extends Command {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The type of the list created by the command.
|
|
13
|
+
*/
|
|
14
|
+
readonly type: ListType;
|
|
15
|
+
/**
|
|
16
|
+
* A flag indicating whether the command is active, which means that the selection starts in a list of the same type.
|
|
17
|
+
*
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
value: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Creates an instance of the command.
|
|
23
|
+
*
|
|
24
|
+
* @param editor The editor instance.
|
|
25
|
+
* @param type List type that will be handled by this command.
|
|
26
|
+
*/
|
|
27
|
+
constructor(editor: Editor, type: ListType);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
override refresh(): void;
|
|
32
|
+
/**
|
|
33
|
+
* Executes the list command.
|
|
34
|
+
*
|
|
35
|
+
* @fires execute
|
|
36
|
+
* @param options Command options.
|
|
37
|
+
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the
|
|
38
|
+
* selected items and potentially the neighbor elements to the proper list items. If set to `false`, it will convert selected elements
|
|
39
|
+
* to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.
|
|
40
|
+
*/
|
|
41
|
+
override execute(options?: {
|
|
42
|
+
forceValue?: boolean;
|
|
43
|
+
}): void;
|
|
44
|
+
/**
|
|
45
|
+
* Checks the command's {@link #value}.
|
|
46
|
+
*
|
|
47
|
+
* @returns The current value.
|
|
48
|
+
*/
|
|
49
|
+
private _getValue;
|
|
50
|
+
/**
|
|
51
|
+
* Checks whether the command can be enabled in the current context.
|
|
52
|
+
*
|
|
53
|
+
* @returns Whether the command should be enabled.
|
|
54
|
+
*/
|
|
55
|
+
private _checkEnabled;
|
|
56
56
|
}
|