@ckeditor/ckeditor5-list 31.1.0 → 32.0.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/LICENSE.md +2 -2
- package/build/list.js +3 -3
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +8 -4
- package/lang/contexts.json +5 -1
- package/lang/translations/ar.po +17 -1
- package/lang/translations/ast.po +17 -1
- package/lang/translations/az.po +17 -1
- package/lang/translations/bg.po +17 -1
- package/lang/translations/cs.po +17 -1
- package/lang/translations/da.po +17 -1
- package/lang/translations/de-ch.po +17 -1
- package/lang/translations/de.po +17 -1
- package/lang/translations/el.po +17 -1
- package/lang/translations/en-au.po +17 -1
- package/lang/translations/en-gb.po +17 -1
- package/lang/translations/en.po +17 -1
- package/lang/translations/eo.po +17 -1
- package/lang/translations/es.po +17 -1
- package/lang/translations/et.po +17 -1
- package/lang/translations/eu.po +17 -1
- package/lang/translations/fa.po +17 -1
- package/lang/translations/fi.po +17 -1
- package/lang/translations/fr.po +17 -1
- package/lang/translations/gl.po +17 -1
- package/lang/translations/he.po +17 -1
- package/lang/translations/hi.po +17 -1
- package/lang/translations/hr.po +17 -1
- package/lang/translations/hu.po +17 -1
- package/lang/translations/id.po +17 -1
- package/lang/translations/it.po +17 -1
- package/lang/translations/ja.po +17 -1
- package/lang/translations/km.po +17 -1
- package/lang/translations/kn.po +17 -1
- package/lang/translations/ko.po +17 -1
- package/lang/translations/ku.po +17 -1
- package/lang/translations/lt.po +17 -1
- package/lang/translations/lv.po +17 -1
- package/lang/translations/nb.po +17 -1
- package/lang/translations/ne.po +17 -1
- package/lang/translations/nl.po +17 -1
- package/lang/translations/no.po +17 -1
- package/lang/translations/pl.po +17 -1
- package/lang/translations/pt-br.po +17 -1
- package/lang/translations/pt.po +17 -1
- package/lang/translations/ro.po +17 -1
- package/lang/translations/ru.po +17 -1
- package/lang/translations/si.po +17 -1
- package/lang/translations/sk.po +17 -1
- package/lang/translations/sq.po +17 -1
- package/lang/translations/sr-latn.po +17 -1
- package/lang/translations/sr.po +17 -1
- package/lang/translations/sv.po +17 -1
- package/lang/translations/tk.po +17 -1
- package/lang/translations/tr.po +17 -1
- package/lang/translations/ug.po +17 -1
- package/lang/translations/uk.po +17 -1
- package/lang/translations/uz.po +17 -1
- package/lang/translations/vi.po +17 -1
- package/lang/translations/zh-cn.po +17 -1
- package/lang/translations/zh.po +17 -1
- package/package.json +27 -27
- package/src/checktodolistcommand.js +1 -1
- package/src/converters.js +13 -1
- package/src/indentcommand.js +1 -1
- package/src/index.js +4 -4
- package/src/list.js +24 -1
- package/src/listcommand.js +2 -2
- package/src/listediting.js +1 -1
- package/src/listproperties.js +96 -0
- package/src/{liststyleediting.js → listpropertiesediting.js} +299 -122
- package/src/listpropertiesui.js +314 -0
- package/src/listreversedcommand.js +64 -0
- package/src/liststartcommand.js +63 -0
- package/src/liststyle.js +12 -6
- package/src/liststylecommand.js +5 -22
- package/src/listui.js +1 -1
- package/src/todolist.js +1 -1
- package/src/todolistconverters.js +1 -1
- package/src/todolistediting.js +1 -1
- package/src/todolistui.js +1 -1
- package/src/ui/collapsibleview.js +152 -0
- package/src/ui/listpropertiesview.js +405 -0
- package/src/utils.js +49 -4
- package/theme/collapsible.css +10 -0
- package/theme/listproperties.css +10 -0
- package/theme/liststyles.css +2 -6
- package/theme/todolist.css +1 -1
- package/src/liststyleui.js +0 -225
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-list",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "Ordered and unordered lists feature to CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,36 +12,36 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "^
|
|
15
|
+
"ckeditor5": "^32.0.0",
|
|
16
|
+
"@ckeditor/ckeditor5-ui": "^32.0.0"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
|
19
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
20
|
-
"@ckeditor/ckeditor5-clipboard": "^
|
|
21
|
-
"@ckeditor/ckeditor5-core": "^
|
|
22
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
23
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
24
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
25
|
-
"@ckeditor/ckeditor5-enter": "^
|
|
26
|
-
"@ckeditor/ckeditor5-essentials": "^
|
|
27
|
-
"@ckeditor/ckeditor5-font": "^
|
|
28
|
-
"@ckeditor/ckeditor5-heading": "^
|
|
29
|
-
"@ckeditor/ckeditor5-highlight": "^
|
|
30
|
-
"@ckeditor/ckeditor5-indent": "^
|
|
31
|
-
"@ckeditor/ckeditor5-link": "^
|
|
32
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
33
|
-
"@ckeditor/ckeditor5-remove-format": "^
|
|
34
|
-
"@ckeditor/ckeditor5-table": "^
|
|
35
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
|
36
|
-
"@ckeditor/ckeditor5-typing": "^
|
|
37
|
-
"@ckeditor/ckeditor5-
|
|
38
|
-
"@ckeditor/ckeditor5-
|
|
39
|
-
"
|
|
40
|
-
"webpack": "^4.
|
|
41
|
-
"webpack-cli": "^3.3.11"
|
|
19
|
+
"@ckeditor/ckeditor5-basic-styles": "^32.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-block-quote": "^32.0.0",
|
|
21
|
+
"@ckeditor/ckeditor5-clipboard": "^32.0.0",
|
|
22
|
+
"@ckeditor/ckeditor5-core": "^32.0.0",
|
|
23
|
+
"@ckeditor/ckeditor5-dev-utils": "^27.1.0",
|
|
24
|
+
"@ckeditor/ckeditor5-editor-classic": "^32.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "^32.0.0",
|
|
26
|
+
"@ckeditor/ckeditor5-enter": "^32.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-essentials": "^32.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-font": "^32.0.0",
|
|
29
|
+
"@ckeditor/ckeditor5-heading": "^32.0.0",
|
|
30
|
+
"@ckeditor/ckeditor5-highlight": "^32.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-indent": "^32.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-link": "^32.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-paragraph": "^32.0.0",
|
|
34
|
+
"@ckeditor/ckeditor5-remove-format": "^32.0.0",
|
|
35
|
+
"@ckeditor/ckeditor5-table": "^32.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-theme-lark": "^32.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-typing": "^32.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-undo": "^32.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-utils": "^32.0.0",
|
|
40
|
+
"webpack": "^5.58.1",
|
|
41
|
+
"webpack-cli": "^4.9.0"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=
|
|
44
|
+
"node": ">=14.0.0",
|
|
45
45
|
"npm": ">=5.7.1"
|
|
46
46
|
},
|
|
47
47
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/converters.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -605,6 +605,18 @@ export function modelChangePostFixer( model, writer ) {
|
|
|
605
605
|
applied = true;
|
|
606
606
|
}
|
|
607
607
|
|
|
608
|
+
if ( item.hasAttribute( 'listReversed' ) ) {
|
|
609
|
+
writer.removeAttribute( 'listReversed', item );
|
|
610
|
+
|
|
611
|
+
applied = true;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
if ( item.hasAttribute( 'listStart' ) ) {
|
|
615
|
+
writer.removeAttribute( 'listStart', item );
|
|
616
|
+
|
|
617
|
+
applied = true;
|
|
618
|
+
}
|
|
619
|
+
|
|
608
620
|
for ( const innerItem of Array.from( model.createRangeIn( item ) ).filter( e => e.item.is( 'element', 'listItem' ) ) ) {
|
|
609
621
|
_addListToFix( innerItem.previousPosition );
|
|
610
622
|
}
|
package/src/indentcommand.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
export { default as List } from './list';
|
|
11
11
|
export { default as ListEditing } from './listediting';
|
|
12
12
|
export { default as ListUI } from './listui';
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
13
|
+
export { default as ListProperties } from './listproperties';
|
|
14
|
+
export { default as ListPropertiesEditing } from './listpropertiesediting';
|
|
15
|
+
export { default as ListPropertiesUI } from './listpropertiesui';
|
|
16
16
|
export { default as TodoList } from './todolist';
|
|
17
17
|
export { default as TodoListEditing } from './todolistediting';
|
|
18
18
|
export { default as TodoListUI } from './todolistui';
|
package/src/list.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -35,3 +35,26 @@ export default class List extends Plugin {
|
|
|
35
35
|
return 'List';
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The configuration of the {@link module:list/list~List list} feature.
|
|
41
|
+
*
|
|
42
|
+
* ClassicEditor
|
|
43
|
+
* .create( editorElement, {
|
|
44
|
+
* list: ... // The list feature configuration.
|
|
45
|
+
* } )
|
|
46
|
+
* .then( ... )
|
|
47
|
+
* .catch( ... );
|
|
48
|
+
*
|
|
49
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
50
|
+
*
|
|
51
|
+
* @interface ListConfig
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The configuration of the {@link module:list/list~List} feature.
|
|
56
|
+
*
|
|
57
|
+
* Read more in {@link module:list/list~ListConfig}.
|
|
58
|
+
*
|
|
59
|
+
* @member {module:module:list/list~ListConfig} module:core/editor/editorconfig~EditorConfig#list
|
|
60
|
+
*/
|
package/src/listcommand.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -56,7 +56,7 @@ export default class ListCommand extends Command {
|
|
|
56
56
|
* @fires execute
|
|
57
57
|
* @param {Object} [options] Command options.
|
|
58
58
|
* @param {Boolean} [options.forceValue] If set, it will force the command behavior. If `true`, the command will try to convert the
|
|
59
|
-
* selected items and potentially the neighbor elements to the proper list items. If set to `false
|
|
59
|
+
* selected items and potentially the neighbor elements to the proper list items. If set to `false`, it will convert selected elements
|
|
60
60
|
* to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.
|
|
61
61
|
*/
|
|
62
62
|
execute( options = {} ) {
|
package/src/listediting.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @module list/listproperties
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { Plugin } from 'ckeditor5/src/core';
|
|
11
|
+
import ListPropertiesEditing from './listpropertiesediting';
|
|
12
|
+
import ListPropertiesUI from './listpropertiesui';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The list properties feature.
|
|
16
|
+
*
|
|
17
|
+
* This is a "glue" plugin that loads the {@link module:list/listpropertiesediting~ListPropertiesEditing list properties editing feature}
|
|
18
|
+
* and the {@link module:list/listpropertiesui~ListPropertiesUI list properties UI feature}.
|
|
19
|
+
*
|
|
20
|
+
* @extends module:core/plugin~Plugin
|
|
21
|
+
*/
|
|
22
|
+
export default class ListProperties extends Plugin {
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get requires() {
|
|
27
|
+
return [ ListPropertiesEditing, ListPropertiesUI ];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
static get pluginName() {
|
|
34
|
+
return 'ListProperties';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The configuration of the {@link module:list/listproperties~ListProperties list properties} feature.
|
|
40
|
+
*
|
|
41
|
+
* This configuration controls the individual list properties. For instance, it enables or disables specific editor commands
|
|
42
|
+
* operating on lists ({@link module:list/liststylecommand~ListStyleCommand `'listStyle'`},
|
|
43
|
+
* {@link module:list/liststartcommand~ListStartCommand `'listStart'`},
|
|
44
|
+
* {@link module:list/listreversedcommand~ListReversedCommand `'listReversed'`}), the look of the UI
|
|
45
|
+
* (`'numberedList'` and `'bulletedList'` dropdowns), and the editor data pipeline (allowed HTML attributes).
|
|
46
|
+
*
|
|
47
|
+
* ClassicEditor
|
|
48
|
+
* .create( editorElement, {
|
|
49
|
+
* list: {
|
|
50
|
+
* properties: {
|
|
51
|
+
* styles: true,
|
|
52
|
+
* startIndex: true,
|
|
53
|
+
* reversed: true
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* } )
|
|
57
|
+
* .then( ... )
|
|
58
|
+
* .catch( ... );
|
|
59
|
+
*
|
|
60
|
+
* @interface ListPropertiesConfig
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* When set, the list style feature will be enabled. It allows changing the `list-style-type` HTML attribute of the lists.
|
|
65
|
+
*
|
|
66
|
+
* @default true
|
|
67
|
+
* @member {Boolean} module:list/listproperties~ListPropertiesConfig#styles
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* When set, the list start index feature will be enabled. It allows changing the `start` HTML attribute of the numbered lists. As a
|
|
72
|
+
* result, it will be possible to specify the start value of the first item in an ordered list.
|
|
73
|
+
*
|
|
74
|
+
* **Note**: This configuration does not affect bulleted and to-do lists.
|
|
75
|
+
*
|
|
76
|
+
* @default false
|
|
77
|
+
* @member {Boolean} module:list/listproperties~ListPropertiesConfig#startIndex
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* When set, the reversed list feature will be enabled. It allows changing the `reversed` HTML attribute of the numbered lists. As a
|
|
82
|
+
* result, it will be possible to make the list order descending instead of ascending.
|
|
83
|
+
*
|
|
84
|
+
* **Note**: This configuration does not affect bulleted and to-do lists.
|
|
85
|
+
*
|
|
86
|
+
* @default false
|
|
87
|
+
* @member {Boolean} module:list/listproperties~ListPropertiesConfig#reversed
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The configuration of the {@link module:list/listproperties~ListProperties} feature.
|
|
92
|
+
*
|
|
93
|
+
* Read more in {@link module:list/listproperties~ListPropertiesConfig}.
|
|
94
|
+
*
|
|
95
|
+
* @member {module:list/listproperties~ListPropertiesConfig} module:list/list~ListConfig#properties
|
|
96
|
+
*/
|