@ckeditor/ckeditor5-list 41.3.1 → 41.4.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/build/list.js +2 -2
- 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/bn.js +1 -1
- package/build/translations/ca.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/jv.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/ms.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/th.js +1 -1
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.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/dist/index-content.css +102 -0
- package/dist/index-editor.css +74 -0
- package/dist/index.css +238 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +7569 -0
- package/dist/index.js.map +1 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/ast.d.ts +8 -0
- package/dist/translations/ast.js +5 -0
- package/dist/translations/ast.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en-gb.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/eo.d.ts +8 -0
- package/dist/translations/eo.js +5 -0
- package/dist/translations/eo.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +5 -0
- package/dist/translations/eu.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +5 -0
- package/dist/translations/kn.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.umd.js +11 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/ne.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/si.d.ts +8 -0
- package/dist/translations/si.js +5 -0
- package/dist/translations/si.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/types/augmentation.d.ts +57 -0
- package/dist/types/documentlist.d.ts +32 -0
- package/dist/types/documentlistproperties.d.ts +32 -0
- package/dist/types/index.d.ts +49 -0
- package/dist/types/legacylist/legacyconverters.d.ts +200 -0
- package/dist/types/legacylist/legacyindentcommand.d.ts +41 -0
- package/dist/types/legacylist/legacylistcommand.d.ts +60 -0
- package/dist/types/legacylist/legacylistediting.d.ts +36 -0
- package/dist/types/legacylist/legacylistutils.d.ts +45 -0
- package/dist/types/legacylist/legacyutils.d.ts +105 -0
- package/dist/types/legacylist.d.ts +30 -0
- package/dist/types/legacylistproperties/legacylistpropertiesediting.d.ts +76 -0
- package/dist/types/legacylistproperties/legacylistreversedcommand.d.ts +42 -0
- package/dist/types/legacylistproperties/legacyliststartcommand.d.ts +41 -0
- package/dist/types/legacylistproperties/legacyliststylecommand.d.ts +71 -0
- package/dist/types/legacylistproperties.d.ts +31 -0
- package/dist/types/legacytodolist/legacychecktodolistcommand.d.ts +56 -0
- package/dist/types/legacytodolist/legacytodolistconverters.d.ts +87 -0
- package/dist/types/legacytodolist/legacytodolistediting.d.ts +50 -0
- package/dist/types/legacytodolist.d.ts +31 -0
- package/dist/types/list/adjacentlistssupport.d.ts +19 -0
- package/dist/types/list/converters.d.ts +77 -0
- package/dist/types/list/listcommand.d.ts +96 -0
- package/dist/types/list/listediting.d.ts +226 -0
- package/dist/types/list/listindentcommand.d.ts +66 -0
- package/dist/types/list/listmergecommand.d.ts +80 -0
- package/dist/types/list/listsplitcommand.d.ts +71 -0
- package/dist/types/list/listui.d.ts +23 -0
- package/dist/types/list/listutils.d.ts +56 -0
- package/dist/types/list/utils/listwalker.d.ts +146 -0
- package/dist/types/list/utils/model.d.ts +213 -0
- package/dist/types/list/utils/postfixers.d.ts +41 -0
- package/dist/types/list/utils/view.d.ts +86 -0
- package/dist/types/list/utils.d.ts +22 -0
- package/dist/types/list.d.ts +30 -0
- package/dist/types/listconfig.d.ts +136 -0
- package/dist/types/listproperties/converters.d.ts +23 -0
- package/dist/types/listproperties/listpropertiesediting.d.ts +92 -0
- package/dist/types/listproperties/listpropertiesui.d.ts +27 -0
- package/dist/types/listproperties/listpropertiesutils.d.ts +37 -0
- package/dist/types/listproperties/listreversedcommand.d.ts +40 -0
- package/dist/types/listproperties/liststartcommand.d.ts +42 -0
- package/dist/types/listproperties/liststylecommand.d.ts +76 -0
- package/dist/types/listproperties/ui/listpropertiesview.d.ts +160 -0
- package/dist/types/listproperties/utils/style.d.ts +24 -0
- package/dist/types/listproperties.d.ts +31 -0
- package/dist/types/tododocumentlist.d.ts +32 -0
- package/dist/types/todolist/checktodolistcommand.d.ts +53 -0
- package/dist/types/todolist/todocheckboxchangeobserver.d.ts +45 -0
- package/dist/types/todolist/todolistediting.d.ts +49 -0
- package/dist/types/todolist/todolistui.d.ts +23 -0
- package/dist/types/todolist.d.ts +31 -0
- package/lang/contexts.json +3 -1
- package/lang/translations/ar.po +8 -0
- package/lang/translations/ast.po +8 -0
- package/lang/translations/az.po +8 -0
- package/lang/translations/bg.po +8 -0
- package/lang/translations/bn.po +8 -0
- package/lang/translations/ca.po +8 -0
- package/lang/translations/cs.po +8 -0
- package/lang/translations/da.po +8 -0
- package/lang/translations/de-ch.po +8 -0
- package/lang/translations/de.po +8 -0
- package/lang/translations/el.po +8 -0
- package/lang/translations/en-au.po +8 -0
- package/lang/translations/en-gb.po +8 -0
- package/lang/translations/en.po +8 -0
- package/lang/translations/eo.po +8 -0
- package/lang/translations/es.po +8 -0
- package/lang/translations/et.po +8 -0
- package/lang/translations/eu.po +8 -0
- package/lang/translations/fa.po +8 -0
- package/lang/translations/fi.po +8 -0
- package/lang/translations/fr.po +8 -0
- package/lang/translations/gl.po +8 -0
- package/lang/translations/he.po +8 -0
- package/lang/translations/hi.po +8 -0
- package/lang/translations/hr.po +8 -0
- package/lang/translations/hu.po +8 -0
- package/lang/translations/id.po +8 -0
- package/lang/translations/it.po +8 -0
- package/lang/translations/ja.po +8 -0
- package/lang/translations/jv.po +8 -0
- package/lang/translations/km.po +8 -0
- package/lang/translations/kn.po +8 -0
- package/lang/translations/ko.po +8 -0
- package/lang/translations/ku.po +8 -0
- package/lang/translations/lt.po +8 -0
- package/lang/translations/lv.po +8 -0
- package/lang/translations/ms.po +8 -0
- package/lang/translations/nb.po +8 -0
- package/lang/translations/ne.po +8 -0
- package/lang/translations/nl.po +8 -0
- package/lang/translations/no.po +8 -0
- package/lang/translations/pl.po +8 -0
- package/lang/translations/pt-br.po +8 -0
- package/lang/translations/pt.po +8 -0
- package/lang/translations/ro.po +8 -0
- package/lang/translations/ru.po +8 -0
- package/lang/translations/si.po +8 -0
- package/lang/translations/sk.po +8 -0
- package/lang/translations/sq.po +8 -0
- package/lang/translations/sr-latn.po +8 -0
- package/lang/translations/sr.po +8 -0
- package/lang/translations/sv.po +8 -0
- package/lang/translations/th.po +8 -0
- package/lang/translations/ti.po +150 -0
- package/lang/translations/tk.po +8 -0
- package/lang/translations/tr.po +8 -0
- package/lang/translations/tt.po +8 -0
- package/lang/translations/ug.po +8 -0
- package/lang/translations/uk.po +8 -0
- package/lang/translations/ur.po +8 -0
- package/lang/translations/uz.po +8 -0
- package/lang/translations/vi.po +8 -0
- package/lang/translations/zh-cn.po +8 -0
- package/lang/translations/zh.po +8 -0
- package/package.json +3 -2
- package/src/legacytodolist/legacytodolistediting.d.ts +7 -0
- package/src/legacytodolist/legacytodolistediting.js +32 -0
- package/src/list/listui.js +8 -3
- package/src/todolist/todolistediting.d.ts +7 -0
- package/src/todolist/todolistediting.js +38 -0
- package/theme/todolist.css +4 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listconfig
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The configuration of the {@link module:list/list~List list} feature
|
|
14
|
+
* and the {@link module:list/legacylist~LegacyList legacy list} feature.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* ClassicEditor
|
|
18
|
+
* .create( editorElement, {
|
|
19
|
+
* list: ... // The list feature configuration.
|
|
20
|
+
* } )
|
|
21
|
+
* .then( ... )
|
|
22
|
+
* .catch( ... );
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
26
|
+
*
|
|
27
|
+
* @interface ListConfig
|
|
28
|
+
*/
|
|
29
|
+
export interface ListConfig {
|
|
30
|
+
/**
|
|
31
|
+
* The configuration of the {@link module:list/listproperties~ListProperties} feature and the
|
|
32
|
+
* {@link module:list/legacylistproperties~LegacyListProperties legacy list properties} feature.
|
|
33
|
+
*
|
|
34
|
+
* Read more in {@link module:list/listconfig~ListPropertiesConfig}.
|
|
35
|
+
*/
|
|
36
|
+
properties?: ListPropertiesConfig;
|
|
37
|
+
/**
|
|
38
|
+
* Allows multiple blocks in single list item.
|
|
39
|
+
*
|
|
40
|
+
* With this option enabled you can have block widgets, for example images or even tables, within a list item.
|
|
41
|
+
*
|
|
42
|
+
* **Note:** This is enabled by default.
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
multiBlock?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The configuration of the {@link module:list/listproperties~ListProperties list properties} feature and the
|
|
50
|
+
* {@link module:list/legacylistproperties~LegacyListProperties legacy list properties} feature.
|
|
51
|
+
*
|
|
52
|
+
* This configuration controls the individual list properties. For instance, it enables or disables specific editor commands
|
|
53
|
+
* operating on lists ({@link module:list/listproperties/liststylecommand~ListStyleCommand `'listStyle'`},
|
|
54
|
+
* {@link module:list/listproperties/liststartcommand~ListStartCommand `'listStart'`},
|
|
55
|
+
* {@link module:list/listproperties/listreversedcommand~ListReversedCommand `'listReversed'`}, or on the legacy lists
|
|
56
|
+
* {@link module:list/legacylistproperties/legacyliststylecommand~LegacyListStyleCommand `'listStyle'`},
|
|
57
|
+
* {@link module:list/legacylistproperties/legacyliststartcommand~LegacyListStartCommand `'listStart'`},
|
|
58
|
+
* {@link module:list/legacylistproperties/legacylistreversedcommand~LegacyListReversedCommand `'listReversed'`}), the look of the UI
|
|
59
|
+
* (`'numberedList'` and `'bulletedList'` dropdowns), and the editor data pipeline (allowed HTML attributes).
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* ClassicEditor
|
|
63
|
+
* .create( editorElement, {
|
|
64
|
+
* list: {
|
|
65
|
+
* properties: {
|
|
66
|
+
* styles: true,
|
|
67
|
+
* startIndex: true,
|
|
68
|
+
* reversed: true
|
|
69
|
+
* }
|
|
70
|
+
* }
|
|
71
|
+
* } )
|
|
72
|
+
* .then( ... )
|
|
73
|
+
* .catch( ... );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export interface ListPropertiesConfig {
|
|
77
|
+
/**
|
|
78
|
+
* When set, the list style feature will be enabled.
|
|
79
|
+
* It allows changing the `list-style-type` style or the `type` HTML attribute of a list.
|
|
80
|
+
*
|
|
81
|
+
* **Note**: Styling using the `type` HTML attribute is only available in
|
|
82
|
+
* {@link module:list/listproperties~ListProperties list properties}
|
|
83
|
+
* ({@link module:list/listconfig~ListPropertiesStyleConfig learn more}).
|
|
84
|
+
*
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
styles?: boolean | ListPropertiesStyleConfig;
|
|
88
|
+
/**
|
|
89
|
+
* When set, the list start index feature will be enabled. It allows changing the `start` HTML attribute of the numbered lists. As a
|
|
90
|
+
* result, it will be possible to specify the start value of the first item in an ordered list.
|
|
91
|
+
*
|
|
92
|
+
* **Note**: This configuration does not affect bulleted and to-do lists.
|
|
93
|
+
*
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
startIndex?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* When set, the reversed list feature will be enabled. It allows changing the `reversed` HTML attribute of the numbered lists. As a
|
|
99
|
+
* result, it will be possible to make the list order descending instead of ascending.
|
|
100
|
+
*
|
|
101
|
+
* **Note**: This configuration does not affect bulleted and to-do lists.
|
|
102
|
+
*
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
reversed?: boolean;
|
|
106
|
+
}
|
|
107
|
+
export interface ListPropertiesStyleConfig {
|
|
108
|
+
/**
|
|
109
|
+
* When set `true`, the list style feature will use the `type` attribute of `<ul>` and `<ol>` elements instead of the `list-style-type`
|
|
110
|
+
* style.
|
|
111
|
+
*
|
|
112
|
+
* ```ts
|
|
113
|
+
* {
|
|
114
|
+
* list: {
|
|
115
|
+
* properties: {
|
|
116
|
+
* styles: {
|
|
117
|
+
* useAttribute: true
|
|
118
|
+
* },
|
|
119
|
+
*
|
|
120
|
+
* // ...
|
|
121
|
+
* }
|
|
122
|
+
* },
|
|
123
|
+
*
|
|
124
|
+
* // ...
|
|
125
|
+
* }
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* **Note**: Due to limitations of HTML, the "Decimal with leading zero" style is impossible to set using the `type` attribute.
|
|
129
|
+
*
|
|
130
|
+
* **Note**: This configuration works only with
|
|
131
|
+
* {@link module:list/listproperties~ListProperties list properties}.
|
|
132
|
+
*
|
|
133
|
+
* @default false
|
|
134
|
+
*/
|
|
135
|
+
useAttribute?: boolean;
|
|
136
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/converters
|
|
11
|
+
*/
|
|
12
|
+
import type { UpcastElementEvent } from 'ckeditor5/src/engine.js';
|
|
13
|
+
import type { GetCallback } from 'ckeditor5/src/utils.js';
|
|
14
|
+
import type { AttributeStrategy } from './listpropertiesediting.js';
|
|
15
|
+
/**
|
|
16
|
+
* Returns a converter that consumes the `style`, `reversed`, and `start` attributes.
|
|
17
|
+
* In `style`, it searches for the `list-style-type` definition.
|
|
18
|
+
* If not found, the `"default"` value will be used.
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
21
|
+
* @param strategy
|
|
22
|
+
*/
|
|
23
|
+
export declare function listPropertiesUpcastConverter(strategy: AttributeStrategy): GetCallback<UpcastElementEvent>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/listpropertiesediting
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
import type { Consumables, DowncastWriter, Element, Item, ViewElement } from 'ckeditor5/src/engine.js';
|
|
14
|
+
import ListEditing, { type ListItemAttributesMap } from '../list/listediting.js';
|
|
15
|
+
import ListPropertiesUtils from './listpropertiesutils.js';
|
|
16
|
+
/**
|
|
17
|
+
* The document list properties engine feature.
|
|
18
|
+
*
|
|
19
|
+
* It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.
|
|
20
|
+
* Read more in {@link module:list/listconfig~ListPropertiesConfig}.
|
|
21
|
+
*/
|
|
22
|
+
export default class ListPropertiesEditing extends Plugin {
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get requires(): readonly [typeof ListEditing, typeof ListPropertiesUtils];
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static get pluginName(): "ListPropertiesEditing";
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
constructor(editor: Editor);
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
init(): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Strategy for dealing with `listItem` attributes supported by this plugin.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export interface AttributeStrategy {
|
|
46
|
+
/**
|
|
47
|
+
* The model attribute name.
|
|
48
|
+
*/
|
|
49
|
+
attributeName: keyof ListItemAttributesMap;
|
|
50
|
+
/**
|
|
51
|
+
* The model attribute default value.
|
|
52
|
+
*/
|
|
53
|
+
defaultValue: unknown;
|
|
54
|
+
/**
|
|
55
|
+
* The view consumable as expected by {@link module:engine/conversion/viewconsumable~ViewConsumable#consume `ViewConsumable`}.
|
|
56
|
+
*/
|
|
57
|
+
viewConsumables: Consumables;
|
|
58
|
+
/**
|
|
59
|
+
* Registers an editor command.
|
|
60
|
+
*/
|
|
61
|
+
addCommand(editor: Editor): void;
|
|
62
|
+
/**
|
|
63
|
+
* Verifies whether the strategy is applicable for the specified model element.
|
|
64
|
+
*/
|
|
65
|
+
appliesToListItem(element: Item): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Verifies whether the model attribute value is valid.
|
|
68
|
+
*/
|
|
69
|
+
hasValidAttribute(element: Element): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Sets the property on the view element.
|
|
72
|
+
*/
|
|
73
|
+
setAttributeOnDowncast(writer: DowncastWriter, value: unknown, element: ViewElement): void;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves the property value from the view element.
|
|
76
|
+
*/
|
|
77
|
+
getAttributeOnUpcast(element: ViewElement): unknown;
|
|
78
|
+
}
|
|
79
|
+
declare module '../list/listediting' {
|
|
80
|
+
interface ListItemAttributesMap {
|
|
81
|
+
listStyle?: string;
|
|
82
|
+
listStart?: number;
|
|
83
|
+
listReversed?: boolean;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
declare module '../list/utils/model' {
|
|
87
|
+
interface ListElement {
|
|
88
|
+
getAttribute(key: 'listStyle'): string;
|
|
89
|
+
getAttribute(key: 'listStart'): number;
|
|
90
|
+
getAttribute(key: 'listReversed'): boolean;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/listpropertiesui
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
import '../../theme/liststyles.css';
|
|
14
|
+
/**
|
|
15
|
+
* The list properties UI plugin. It introduces the extended `'bulletedList'` and `'numberedList'` toolbar
|
|
16
|
+
* buttons that allow users to control such aspects of list as the marker, start index or order.
|
|
17
|
+
*
|
|
18
|
+
* **Note**: Buttons introduced by this plugin override implementations from the {@link module:list/list/listui~ListUI}
|
|
19
|
+
* (because they share the same names).
|
|
20
|
+
*/
|
|
21
|
+
export default class ListPropertiesUI extends Plugin {
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
static get pluginName(): "ListPropertiesUI";
|
|
26
|
+
init(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/listpropertiesutils
|
|
11
|
+
*/
|
|
12
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* A set of helpers related to document lists.
|
|
15
|
+
*/
|
|
16
|
+
export default class ListPropertiesUtils extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "ListPropertiesUtils";
|
|
21
|
+
/**
|
|
22
|
+
* Gets all the style types supported by given list type.
|
|
23
|
+
*/
|
|
24
|
+
getAllSupportedStyleTypes(): Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Checks whether the given list-style-type is supported by numbered or bulleted list.
|
|
27
|
+
*/
|
|
28
|
+
getListTypeFromListStyleType(listStyleType: string): 'bulleted' | 'numbered' | null;
|
|
29
|
+
/**
|
|
30
|
+
* Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.
|
|
31
|
+
*/
|
|
32
|
+
getListStyleTypeFromTypeAttribute(value: string): string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.
|
|
35
|
+
*/
|
|
36
|
+
getTypeAttributeFromListStyleType(value: string): string | null;
|
|
37
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/listreversedcommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The list reversed command. It changes the `listReversed` attribute of the selected list items,
|
|
15
|
+
* letting the user to choose the order of an ordered list.
|
|
16
|
+
* It is used by the {@link module:list/listproperties~ListProperties list properties feature}.
|
|
17
|
+
*/
|
|
18
|
+
export default class ListReversedCommand extends Command {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
value: boolean | null;
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
refresh(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Executes the command.
|
|
29
|
+
*
|
|
30
|
+
* @fires execute
|
|
31
|
+
* @param options.reversed Whether the list should be reversed.
|
|
32
|
+
*/
|
|
33
|
+
execute(options?: {
|
|
34
|
+
reversed?: boolean;
|
|
35
|
+
}): void;
|
|
36
|
+
/**
|
|
37
|
+
* Checks the command's {@link #value}.
|
|
38
|
+
*/
|
|
39
|
+
private _getValue;
|
|
40
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/liststartcommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The list start index command. It changes the `listStart` attribute of the selected list items,
|
|
15
|
+
* letting the user to choose the starting point of an ordered list.
|
|
16
|
+
* It is used by the {@link module:list/listproperties~ListProperties list properties feature}.
|
|
17
|
+
*/
|
|
18
|
+
export default class ListStartCommand extends Command {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
value: number | null;
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
refresh(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Executes the command.
|
|
29
|
+
*
|
|
30
|
+
* @fires execute
|
|
31
|
+
* @param options.startIndex The list start index.
|
|
32
|
+
*/
|
|
33
|
+
execute({ startIndex }?: {
|
|
34
|
+
startIndex?: number;
|
|
35
|
+
}): void;
|
|
36
|
+
/**
|
|
37
|
+
* Checks the command's {@link #value}.
|
|
38
|
+
*
|
|
39
|
+
* @returns The current value.
|
|
40
|
+
*/
|
|
41
|
+
private _getValue;
|
|
42
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/liststylecommand
|
|
11
|
+
*/
|
|
12
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
13
|
+
/**
|
|
14
|
+
* The list style command. It changes `listStyle` attribute of the selected list items,
|
|
15
|
+
* letting the user choose styles for the list item markers.
|
|
16
|
+
* It is used by the {@link module:list/listproperties~ListProperties list properties feature}.
|
|
17
|
+
*/
|
|
18
|
+
export default class ListStyleCommand extends Command {
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
value: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* The default type of the list style.
|
|
25
|
+
*/
|
|
26
|
+
readonly defaultType: string;
|
|
27
|
+
/**
|
|
28
|
+
* The list of supported style types by this command.
|
|
29
|
+
*/
|
|
30
|
+
private _supportedTypes;
|
|
31
|
+
/**
|
|
32
|
+
* Creates an instance of the command.
|
|
33
|
+
*
|
|
34
|
+
* @param editor The editor instance.
|
|
35
|
+
* @param defaultType The list type that will be used by default if the value was not specified during
|
|
36
|
+
* the command execution.
|
|
37
|
+
* @param supportedTypes The list of supported style types by this command.
|
|
38
|
+
*/
|
|
39
|
+
constructor(editor: Editor, defaultType: string, supportedTypes?: Array<string>);
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
refresh(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Executes the command.
|
|
46
|
+
*
|
|
47
|
+
* @fires execute
|
|
48
|
+
* @param options.type The type of the list style, e.g. `'disc'` or `'square'`. If `null` is specified, the default
|
|
49
|
+
* style will be applied.
|
|
50
|
+
*/
|
|
51
|
+
execute(options?: {
|
|
52
|
+
type?: string | null;
|
|
53
|
+
}): void;
|
|
54
|
+
/**
|
|
55
|
+
* Checks if the given style type is supported by this plugin.
|
|
56
|
+
*/
|
|
57
|
+
isStyleTypeSupported(value: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Checks the command's {@link #value}.
|
|
60
|
+
*
|
|
61
|
+
* @returns The current value.
|
|
62
|
+
*/
|
|
63
|
+
private _getValue;
|
|
64
|
+
/**
|
|
65
|
+
* Checks whether the command can be enabled in the current context.
|
|
66
|
+
*
|
|
67
|
+
* @returns Whether the command should be enabled.
|
|
68
|
+
*/
|
|
69
|
+
private _checkEnabled;
|
|
70
|
+
/**
|
|
71
|
+
* Check if the provided list style is valid. Also change the selection to a list if it's not set yet.
|
|
72
|
+
*
|
|
73
|
+
* @param options.type The type of the list style. If `null` is specified, the function does nothing.
|
|
74
|
+
*/
|
|
75
|
+
private _tryToConvertItemsToList;
|
|
76
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module list/listproperties/ui/listpropertiesview
|
|
11
|
+
*/
|
|
12
|
+
import { View, ViewCollection, FocusCycler, SwitchButtonView, LabeledFieldView, CollapsibleView, type ButtonView, type InputNumberView, type FocusableView } from 'ckeditor5/src/ui.js';
|
|
13
|
+
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
14
|
+
import type { ListPropertiesConfig } from '../../listconfig.js';
|
|
15
|
+
import '../../../theme/listproperties.css';
|
|
16
|
+
/**
|
|
17
|
+
* The list properties view to be displayed in the list dropdown.
|
|
18
|
+
*
|
|
19
|
+
* Contains a grid of available list styles and, for numbered list, also the list start index and reversed fields.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export default class ListPropertiesView extends View {
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
locale: Locale;
|
|
28
|
+
/**
|
|
29
|
+
* A collection of the child views.
|
|
30
|
+
*/
|
|
31
|
+
readonly children: ViewCollection;
|
|
32
|
+
/**
|
|
33
|
+
* A view that renders the grid of list styles.
|
|
34
|
+
*/
|
|
35
|
+
readonly stylesView: StylesView | null;
|
|
36
|
+
/**
|
|
37
|
+
* A collapsible view that hosts additional list property fields ({@link #startIndexFieldView} and
|
|
38
|
+
* {@link #reversedSwitchButtonView}) to visually separate them from the {@link #stylesView grid of styles}.
|
|
39
|
+
*
|
|
40
|
+
* **Note**: Only present when:
|
|
41
|
+
* * the view represents **numbered** list properties,
|
|
42
|
+
* * and the {@link #stylesView} is rendered,
|
|
43
|
+
* * and either {@link #startIndexFieldView} or {@link #reversedSwitchButtonView} is rendered.
|
|
44
|
+
*
|
|
45
|
+
* @readonly
|
|
46
|
+
*/
|
|
47
|
+
additionalPropertiesCollapsibleView: CollapsibleView | null;
|
|
48
|
+
/**
|
|
49
|
+
* A labeled number field allowing the user to set the start index of the list.
|
|
50
|
+
*
|
|
51
|
+
* **Note**: Only present when the view represents **numbered** list properties.
|
|
52
|
+
*
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
55
|
+
startIndexFieldView: LabeledFieldView<InputNumberView> | null;
|
|
56
|
+
/**
|
|
57
|
+
* A switch button allowing the user to make the edited list reversed.
|
|
58
|
+
*
|
|
59
|
+
* **Note**: Only present when the view represents **numbered** list properties.
|
|
60
|
+
*
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
reversedSwitchButtonView: SwitchButtonView | null;
|
|
64
|
+
/**
|
|
65
|
+
* Tracks information about the DOM focus in the view.
|
|
66
|
+
*/
|
|
67
|
+
readonly focusTracker: FocusTracker;
|
|
68
|
+
/**
|
|
69
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
70
|
+
*/
|
|
71
|
+
readonly keystrokes: KeystrokeHandler;
|
|
72
|
+
/**
|
|
73
|
+
* A collection of views that can be focused in the properties view.
|
|
74
|
+
*/
|
|
75
|
+
readonly focusables: ViewCollection<FocusableView>;
|
|
76
|
+
/**
|
|
77
|
+
* Helps cycling over {@link #focusables} in the view.
|
|
78
|
+
*/
|
|
79
|
+
readonly focusCycler: FocusCycler;
|
|
80
|
+
/**
|
|
81
|
+
* Creates an instance of the list properties view.
|
|
82
|
+
*
|
|
83
|
+
* @param locale The {@link module:core/editor/editor~Editor#locale} instance.
|
|
84
|
+
* @param options Options of the view.
|
|
85
|
+
* @param options.enabledProperties An object containing the configuration of enabled list property names.
|
|
86
|
+
* Allows conditional rendering the sub-components of the properties view.
|
|
87
|
+
* @param options.styleButtonViews A list of style buttons to be rendered
|
|
88
|
+
* inside the styles grid. The grid will not be rendered when `enabledProperties` does not include the `'styles'` key.
|
|
89
|
+
* @param options.styleGridAriaLabel An assistive technologies label set on the grid of styles (if the grid is rendered).
|
|
90
|
+
*/
|
|
91
|
+
constructor(locale: Locale, { enabledProperties, styleButtonViews, styleGridAriaLabel }: {
|
|
92
|
+
enabledProperties: ListPropertiesConfig;
|
|
93
|
+
styleButtonViews: Array<ButtonView> | null;
|
|
94
|
+
styleGridAriaLabel: string;
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* @inheritDoc
|
|
98
|
+
*/
|
|
99
|
+
render(): void;
|
|
100
|
+
/**
|
|
101
|
+
* @inheritDoc
|
|
102
|
+
*/
|
|
103
|
+
focus(): void;
|
|
104
|
+
/**
|
|
105
|
+
* @inheritDoc
|
|
106
|
+
*/
|
|
107
|
+
focusLast(): void;
|
|
108
|
+
/**
|
|
109
|
+
* @inheritDoc
|
|
110
|
+
*/
|
|
111
|
+
destroy(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Creates the list styles grid.
|
|
114
|
+
*
|
|
115
|
+
* @param styleButtons Buttons to be placed in the grid.
|
|
116
|
+
* @param styleGridAriaLabel The assistive technology label of the grid.
|
|
117
|
+
*/
|
|
118
|
+
private _createStylesView;
|
|
119
|
+
/**
|
|
120
|
+
* Renders {@link #startIndexFieldView} and/or {@link #reversedSwitchButtonView} depending on the configuration of the properties view.
|
|
121
|
+
*
|
|
122
|
+
* @param enabledProperties An object containing the configuration of enabled list property names
|
|
123
|
+
* (see {@link #constructor}).
|
|
124
|
+
*/
|
|
125
|
+
private _addNumberedListPropertyViews;
|
|
126
|
+
/**
|
|
127
|
+
* Creates the list start index labeled field.
|
|
128
|
+
*/
|
|
129
|
+
private _createStartIndexField;
|
|
130
|
+
/**
|
|
131
|
+
* Creates the reversed list switch button.
|
|
132
|
+
*/
|
|
133
|
+
private _createReversedSwitchButton;
|
|
134
|
+
}
|
|
135
|
+
export type StylesView = View & {
|
|
136
|
+
children: ViewCollection;
|
|
137
|
+
focusTracker: FocusTracker;
|
|
138
|
+
keystrokes: KeystrokeHandler;
|
|
139
|
+
focus(): void;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Fired when the list start index value has changed via {@link ~ListPropertiesView#startIndexFieldView}.
|
|
143
|
+
*
|
|
144
|
+
* @eventName ~ListPropertiesView#listStart
|
|
145
|
+
*/
|
|
146
|
+
export type ListPropertiesViewListStartEvent = {
|
|
147
|
+
name: 'listStart';
|
|
148
|
+
args: [data: {
|
|
149
|
+
startIndex: number;
|
|
150
|
+
}];
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Fired when the list order has changed (reversed) via {@link ~ListPropertiesView#reversedSwitchButtonView}.
|
|
154
|
+
*
|
|
155
|
+
* @eventName ~ListPropertiesView#listReversed
|
|
156
|
+
*/
|
|
157
|
+
export type ListPropertiesViewListReversedEvent = {
|
|
158
|
+
name: 'listReversed';
|
|
159
|
+
args: [];
|
|
160
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Gets all the style types supported by given list type.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAllSupportedStyleTypes(): Array<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether the given list-style-type is supported by numbered or bulleted list.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getListTypeFromListStyleType(listStyleType: string): 'bulleted' | 'numbered' | null;
|
|
17
|
+
/**
|
|
18
|
+
* Converts `type` attribute of `<ul>` or `<ol>` elements to `list-style-type` equivalent.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getListStyleTypeFromTypeAttribute(value: string): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Converts `list-style-type` style to `type` attribute of `<ul>` or `<ol>` elements.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getTypeAttributeFromListStyleType(value: string): string | null;
|