@ckeditor/ckeditor5-list 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.
- 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
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { LegacyListUtils } from
|
|
6
|
-
import { Plugin } from
|
|
7
|
-
import { Enter } from
|
|
8
|
-
import { Delete } from
|
|
9
|
-
import
|
|
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 { LegacyListUtils } from "./legacylistutils.js";
|
|
6
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
7
|
+
import { Enter } from "@ckeditor/ckeditor5-enter";
|
|
8
|
+
import { Delete } from "@ckeditor/ckeditor5-typing";
|
|
9
|
+
import "../../theme/list.css";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* The engine of the list feature. It handles creating, editing and removing lists and list items.
|
|
12
|
+
*
|
|
13
|
+
* It registers the `'numberedList'`, `'bulletedList'`, `'indentList'` and `'outdentList'` commands.
|
|
14
|
+
*/
|
|
15
15
|
export declare class LegacyListEditing extends Plugin {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get pluginName(): "LegacyListEditing";
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static override get isOfficialPlugin(): true;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get requires(): PluginDependenciesOf<[Enter, Delete, LegacyListUtils]>;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
init(): void;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
afterInit(): void;
|
|
36
36
|
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import type { ModelElement, Model, ModelPosition } from
|
|
9
|
-
import { Plugin } from
|
|
6
|
+
* @module list/legacylist/legacylistutils
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelElement, Model, ModelPosition } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { Plugin } from "@ckeditor/ckeditor5-core";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* A set of helpers related to legacy lists.
|
|
12
|
+
*/
|
|
13
13
|
export declare class LegacyListUtils extends Plugin {
|
|
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
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get pluginName(): "LegacyListUtils";
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static override get isOfficialPlugin(): true;
|
|
22
|
+
/**
|
|
23
|
+
* Checks whether the given list-style-type is supported by numbered or bulleted list.
|
|
24
|
+
*/
|
|
25
|
+
getListTypeFromListStyleType(listStyleType: string): "bulleted" | "numbered" | null;
|
|
26
|
+
/**
|
|
27
|
+
* Returns an array with all `listItem` elements in the model selection.
|
|
28
|
+
*
|
|
29
|
+
* It returns all the items even if only a part of the list is selected, including items that belong to nested lists.
|
|
30
|
+
* If no list is selected, it returns an empty array.
|
|
31
|
+
* The order of the elements is not specified.
|
|
32
|
+
*/
|
|
33
|
+
getSelectedListItems(model: Model): Array<ModelElement>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns an array with all `listItem` elements that represent the same list.
|
|
36
|
+
*
|
|
37
|
+
* It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.
|
|
38
|
+
*
|
|
39
|
+
* Additionally, if the `position` is inside a list item, that list item will be returned as well.
|
|
40
|
+
*
|
|
41
|
+
* @param position Starting position.
|
|
42
|
+
* @param direction Walking direction.
|
|
43
|
+
*/
|
|
44
|
+
getSiblingNodes(position: ModelPosition, direction: "forward" | "backward"): Array<ModelElement>;
|
|
45
45
|
}
|
|
@@ -1,112 +1,112 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import { type DowncastConversionApi, type ViewDowncastWriter, type ModelElement, type ModelItem, type Model, type ModelPosition, type ViewContainerElement, type ViewElement, type ViewItem, type ViewPosition } from
|
|
6
|
+
* @module list/legacylist/legacyutils
|
|
7
|
+
*/
|
|
8
|
+
import { type DowncastConversionApi, type ViewDowncastWriter, type ModelElement, type ModelItem, type Model, type ModelPosition, type ViewContainerElement, type ViewElement, type ViewItem, type ViewPosition } from "@ckeditor/ckeditor5-engine";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
* Creates a list item {@link module:engine/view/containerelement~ViewContainerElement}.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
* @param writer The writer instance.
|
|
14
|
+
*/
|
|
15
15
|
export declare function createViewListItemElement(writer: ViewDowncastWriter): ViewContainerElement;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
* Helper function that creates a `<ul><li></li></ul>` or (`<ol>`) structure out of the given `modelItem` model `listItem` element.
|
|
18
|
+
* Then, it binds the created view list item (`<li>`) with the model `listItem` element.
|
|
19
|
+
* The function then returns the created view list item (`<li>`).
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
* @param modelItem Model list item.
|
|
23
|
+
* @param conversionApi Conversion interface.
|
|
24
|
+
* @returns View list element.
|
|
25
|
+
*/
|
|
26
26
|
export declare function generateLiInUl(modelItem: ModelItem, conversionApi: DowncastConversionApi): ViewContainerElement;
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
* Helper function that inserts a view list at a correct place and merges it with its siblings.
|
|
29
|
+
* It takes a model list item element (`modelItem`) and a corresponding view list item element (`injectedItem`). The view list item
|
|
30
|
+
* should be in a view list element (`<ul>` or `<ol>`) and should be its only child.
|
|
31
|
+
* See comments below to better understand the algorithm.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
* @param modelItem Model list item.
|
|
35
|
+
* @param injectedItem
|
|
36
|
+
* @param conversionApi Conversion interface.
|
|
37
|
+
* @param model The model instance.
|
|
38
|
+
*/
|
|
39
39
|
export declare function injectViewList(modelItem: ModelElement, injectedItem: ViewContainerElement, conversionApi: DowncastConversionApi, model: Model): void;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
* Helper function that takes two parameters that are expected to be view list elements, and merges them.
|
|
42
|
+
* The merge happens only if both parameters are list elements of the same type (the same element name and the same class attributes).
|
|
43
|
+
*
|
|
44
|
+
* @internal
|
|
45
|
+
* @param viewWriter The writer instance.
|
|
46
|
+
* @param firstList The first element to compare.
|
|
47
|
+
* @param secondList The second element to compare.
|
|
48
|
+
* @returns The position after merge or `null` when there was no merge.
|
|
49
|
+
*/
|
|
50
50
|
export declare function mergeViewLists(viewWriter: ViewDowncastWriter, firstList: ViewItem, secondList: ViewItem): ViewPosition | null;
|
|
51
51
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
* Helper function that for a given `view.Position`, returns a `view.Position` that is after all `view.UIElement`s that
|
|
53
|
+
* are after the given position.
|
|
54
|
+
*
|
|
55
|
+
* For example:
|
|
56
|
+
* `<container:p>foo^<ui:span></ui:span><ui:span></ui:span>bar</container:p>`
|
|
57
|
+
* For position ^, the position before "bar" will be returned.
|
|
58
|
+
*
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
61
|
export declare function positionAfterUiElements(viewPosition: ViewPosition): ViewPosition;
|
|
62
62
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
* Helper function that searches for a previous list item sibling of a given model item that meets the given criteria
|
|
64
|
+
* passed by the options object.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
* @param options Search criteria.
|
|
68
|
+
* @param options.sameIndent Whether the sought sibling should have the same indentation.
|
|
69
|
+
* @param options.smallerIndent Whether the sought sibling should have a smaller indentation.
|
|
70
|
+
* @param options.listIndent The reference indentation.
|
|
71
|
+
* @param options.direction Walking direction.
|
|
72
|
+
*/
|
|
73
73
|
export declare function getSiblingListItem(modelItem: ModelItem | null, options: {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
sameIndent?: boolean;
|
|
75
|
+
smallerIndent?: boolean;
|
|
76
|
+
listIndent?: number;
|
|
77
|
+
direction?: "forward" | "backward";
|
|
78
78
|
}): ModelElement | null;
|
|
79
79
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
* Returns a first list view element that is direct child of the given view element.
|
|
81
|
+
*
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
84
|
export declare function findNestedList(viewElement: ViewElement): ViewElement | null;
|
|
85
85
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
export declare function getSiblingNodes(position: ModelPosition, direction:
|
|
86
|
+
* Returns an array with all `listItem` elements that represent the same list.
|
|
87
|
+
*
|
|
88
|
+
* It means that values of `listIndent`, `listType`, `listStyle`, `listReversed` and `listStart` for all items are equal.
|
|
89
|
+
*
|
|
90
|
+
* Additionally, if the `position` is inside a list item, that list item will be returned as well.
|
|
91
|
+
*
|
|
92
|
+
* @internal
|
|
93
|
+
* @param position Starting position.
|
|
94
|
+
* @param direction Walking direction.
|
|
95
|
+
*/
|
|
96
|
+
export declare function getSiblingNodes(position: ModelPosition, direction: "forward" | "backward"): Array<ModelElement>;
|
|
97
97
|
/**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
* Returns an array with all `listItem` elements in the model selection.
|
|
99
|
+
*
|
|
100
|
+
* It returns all the items even if only a part of the list is selected, including items that belong to nested lists.
|
|
101
|
+
* If no list is selected, it returns an empty array.
|
|
102
|
+
* The order of the elements is not specified.
|
|
103
|
+
*
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
106
|
export declare function getSelectedListItems(model: Model): Array<ModelElement>;
|
|
107
107
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
export declare function getListTypeFromListStyleType(listStyleType: string):
|
|
108
|
+
* Checks whether the given list-style-type is supported by numbered or bulleted list.
|
|
109
|
+
*
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
export declare function getListTypeFromListStyleType(listStyleType: string): "bulleted" | "numbered" | null;
|
package/dist/legacylist.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import { LegacyListEditing } from
|
|
9
|
-
import { ListUI } from
|
|
10
|
-
import { Plugin } from
|
|
6
|
+
* @module list/legacylist
|
|
7
|
+
*/
|
|
8
|
+
import { LegacyListEditing } from "./legacylist/legacylistediting.js";
|
|
9
|
+
import { ListUI } from "./list/listui.js";
|
|
10
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
* The legacy list feature.
|
|
13
|
+
*
|
|
14
|
+
* This is a "glue" plugin that loads the {@link module:list/legacylist/legacylistediting~LegacyListEditing legacy list editing feature}
|
|
15
|
+
* and {@link module:list/list/listui~ListUI list UI feature}.
|
|
16
|
+
*/
|
|
17
17
|
export declare class LegacyList extends Plugin {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get requires(): PluginDependenciesOf<[LegacyListEditing, ListUI]>;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "LegacyList";
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static override get isOfficialPlugin(): true;
|
|
30
30
|
}
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin, type Editor } from
|
|
9
|
-
import { LegacyListEditing } from
|
|
6
|
+
* @module list/legacylistproperties/legacylistpropertiesediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { LegacyListEditing } from "../legacylist/legacylistediting.js";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
* The engine of the list properties feature.
|
|
12
|
+
*
|
|
13
|
+
* It sets the value for the `listItem` attribute of the {@link module:list/legacylist~LegacyList `<listItem>`} element that
|
|
14
|
+
* allows modifying the list style type.
|
|
15
|
+
*
|
|
16
|
+
* It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.
|
|
17
|
+
* Read more in {@link module:list/listconfig~ListPropertiesConfig}.
|
|
18
|
+
*/
|
|
19
19
|
export declare class LegacyListPropertiesEditing extends Plugin {
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): PluginDependenciesOf<[LegacyListEditing]>;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get pluginName(): "LegacyListPropertiesEditing";
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static override get isOfficialPlugin(): true;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
constructor(editor: Editor);
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
init(): void;
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
afterInit(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether two lists will be merged into a single
|
|
46
|
+
* one after deleting the content.
|
|
47
|
+
*
|
|
48
|
+
* The purpose of this action is to adjust the `listStyle`, `listReversed` and `listStart` values
|
|
49
|
+
* for the list that was merged.
|
|
50
|
+
*
|
|
51
|
+
* Consider the following model's content:
|
|
52
|
+
*
|
|
53
|
+
* ```xml
|
|
54
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
|
|
55
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
|
|
56
|
+
* <paragraph>[A paragraph.]</paragraph>
|
|
57
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="circle">UL List item 1</listItem>
|
|
58
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="circle">UL List item 2</listItem>
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* After removing the paragraph element, the second list will be merged into the first one.
|
|
62
|
+
* We want to inherit the `listStyle` attribute for the second list from the first one.
|
|
63
|
+
*
|
|
64
|
+
* ```xml
|
|
65
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
|
|
66
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
|
|
67
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
|
|
68
|
+
* <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* See https://github.com/ckeditor/ckeditor5/issues/7879.
|
|
72
|
+
*
|
|
73
|
+
* @param attributeStrategies Strategies for the enabled attributes.
|
|
74
|
+
*/
|
|
75
|
+
private _mergeListAttributesWhileMergingLists;
|
|
76
76
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
import { Command } from
|
|
6
|
+
* @module list/legacylistproperties/legacylistreversedcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "@ckeditor/ckeditor5-core";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
* The reversed list command. It changes the `listReversed` attribute of the selected list items. As a result, the list order will be
|
|
11
|
+
* reversed.
|
|
12
|
+
* It is used by the {@link module:list/legacylistproperties~LegacyListProperties legacy list properties feature}.
|
|
13
|
+
*/
|
|
14
14
|
export declare class LegacyListReversedCommand extends Command {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
value: boolean | null;
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
override refresh(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Executes the command.
|
|
25
|
+
*
|
|
26
|
+
* @fires execute
|
|
27
|
+
* @param options.reversed Whether the list should be reversed.
|
|
28
|
+
*/
|
|
29
|
+
override execute(options?: {
|
|
30
|
+
reversed?: boolean;
|
|
31
|
+
}): void;
|
|
32
|
+
/**
|
|
33
|
+
* Checks the command's {@link #value}.
|
|
34
|
+
*
|
|
35
|
+
* @returns The current value.
|
|
36
|
+
*/
|
|
37
|
+
private _getValue;
|
|
38
38
|
}
|