@ckeditor/ckeditor5-list 29.2.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 -0
- 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 +20 -4
- 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 +21 -5
- 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 +125 -0
- package/lang/translations/vi.po +17 -1
- package/lang/translations/zh-cn.po +17 -1
- package/lang/translations/zh.po +36 -20
- package/package.json +27 -27
- package/src/checktodolistcommand.js +1 -1
- package/src/converters.js +14 -15
- 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/CHANGELOG.md +0 -272
- package/src/liststyleui.js +0 -225
package/CHANGELOG.md
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
Changelog
|
|
2
|
-
=========
|
|
3
|
-
|
|
4
|
-
All changes in the package are documented in the main repository. See: https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
|
|
5
|
-
|
|
6
|
-
Changes for the past releases are available below.
|
|
7
|
-
|
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v18.0.0...v19.0.0) (2020-04-29)
|
|
9
|
-
|
|
10
|
-
### Other changes
|
|
11
|
-
|
|
12
|
-
* Improved performance of processing (loading) long lists. Closes [ckeditor/ckeditor5#6581](https://github.com/ckeditor/ckeditor5/issues/6581). ([b52db48](https://github.com/ckeditor/ckeditor5-list/commit/b52db48))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v17.0.0...v18.0.0) (2020-03-19)
|
|
16
|
-
|
|
17
|
-
### Other changes
|
|
18
|
-
|
|
19
|
-
* Updated translations. ([92c4ec0](https://github.com/ckeditor/ckeditor5-list/commit/92c4ec0))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v16.0.0...v17.0.0) (2020-02-19)
|
|
23
|
-
|
|
24
|
-
### Bug fixes
|
|
25
|
-
|
|
26
|
-
* Focus the editor before executing toolbar buttons' command. See [ckeditor/ckeditor5#353](https://github.com/ckeditor/ckeditor5/issues/353). ([4af8783](https://github.com/ckeditor/ckeditor5-list/commit/4af8783))
|
|
27
|
-
|
|
28
|
-
### Other changes
|
|
29
|
-
|
|
30
|
-
* Updated translations. ([f87974b](https://github.com/ckeditor/ckeditor5-list/commit/f87974b))
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v15.0.0...v16.0.0) (2019-12-04)
|
|
34
|
-
|
|
35
|
-
### Other changes
|
|
36
|
-
|
|
37
|
-
* Updated translations. ([53e1503](https://github.com/ckeditor/ckeditor5-list/commit/53e1503))
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## [15.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v12.1.0...v15.0.0) (2019-10-23)
|
|
41
|
-
|
|
42
|
-
### MAJOR BREAKING CHANGES
|
|
43
|
-
|
|
44
|
-
* The structure of the to–do list has changed (both in the editing and in the data). Please refer to the documentation for the information about used class names as it can impact the existing styles of your application.
|
|
45
|
-
|
|
46
|
-
### Features
|
|
47
|
-
|
|
48
|
-
* Introduces content styles for to–do lists. Unified to–do list representation in the editing and data. Extracted feature styles to a todolist.css file. Closes [#147](https://github.com/ckeditor/ckeditor5-list/issues/147). Closes [ckeditor/ckeditor5#2063](https://github.com/ckeditor/ckeditor5/issues/2063). ([5605663](https://github.com/ckeditor/ckeditor5-list/commit/5605663))
|
|
49
|
-
|
|
50
|
-
### Bug fixes
|
|
51
|
-
|
|
52
|
-
* Improved conversion of invalid nested lists. Closes [#115](https://github.com/ckeditor/ckeditor5-list/issues/115). ([ea55a54](https://github.com/ckeditor/ckeditor5-list/commit/ea55a54))
|
|
53
|
-
* Keyboard navigation should work inside to-do lists in RTL content (see [ckeditor/ckeditor5-list#134](https://github.com/ckeditor/ckeditor5-list/issues/134)). ([63deb51](https://github.com/ckeditor/ckeditor5-list/commit/63deb51))
|
|
54
|
-
* To-do list item styles should not be interactive when applied to editor data (content). Closes [ckeditor/ckeditor5#2090](https://github.com/ckeditor/ckeditor5/issues/2090). ([5662d4e](https://github.com/ckeditor/ckeditor5-list/commit/5662d4e))
|
|
55
|
-
* Use model-to-view position mapping in todo lists. Closes [ckeditor/ckeditor5#2009](https://github.com/ckeditor/ckeditor5/issues/2009). Closed [ckeditor/ckeditor5#1980](https://github.com/ckeditor/ckeditor5/issues/1980). ([ff460f8](https://github.com/ckeditor/ckeditor5-list/commit/ff460f8))
|
|
56
|
-
|
|
57
|
-
### Other changes
|
|
58
|
-
|
|
59
|
-
* Added `pluginName` property to editing plugin. ([48be07f](https://github.com/ckeditor/ckeditor5-list/commit/48be07f))
|
|
60
|
-
* Added `pluginName` property to todo editing plugin. ([3fd6758](https://github.com/ckeditor/ckeditor5-list/commit/3fd6758))
|
|
61
|
-
* Updated translations. ([a6cf5dd](https://github.com/ckeditor/ckeditor5-list/commit/a6cf5dd)) ([4f67d34](https://github.com/ckeditor/ckeditor5-list/commit/4f67d34))
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## [12.1.0](https://github.com/ckeditor/ckeditor5-list/compare/v12.0.4...v12.1.0) (2019-08-26)
|
|
65
|
-
|
|
66
|
-
### Features
|
|
67
|
-
|
|
68
|
-
* Introduced to-do lists. Closes [ckeditor/ckeditor5#1434](https://github.com/ckeditor/ckeditor5/issues/1434). ([56a7a7a](https://github.com/ckeditor/ckeditor5-list/commit/56a7a7a))
|
|
69
|
-
|
|
70
|
-
### Bug fixes
|
|
71
|
-
|
|
72
|
-
* The UI buttons should be marked as toggleable for better assistive technologies support (see [ckeditor/ckeditor5#1403](https://github.com/ckeditor/ckeditor5/issues/1403)). ([bb12325](https://github.com/ckeditor/ckeditor5-list/commit/bb12325))
|
|
73
|
-
|
|
74
|
-
### Other changes
|
|
75
|
-
|
|
76
|
-
* The issue tracker for this package was moved to https://github.com/ckeditor/ckeditor5/issues. See [ckeditor/ckeditor5#1988](https://github.com/ckeditor/ckeditor5/issues/1988). ([5507ac6](https://github.com/ckeditor/ckeditor5-list/commit/5507ac6))
|
|
77
|
-
* Updated translations. ([10e296d](https://github.com/ckeditor/ckeditor5-list/commit/10e296d))
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
## [12.0.4](https://github.com/ckeditor/ckeditor5-list/compare/v12.0.3...v12.0.4) (2019-07-10)
|
|
81
|
-
|
|
82
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
## [12.0.3](https://github.com/ckeditor/ckeditor5-list/compare/v12.0.2...v12.0.3) (2019-07-04)
|
|
86
|
-
|
|
87
|
-
### Other changes
|
|
88
|
-
|
|
89
|
-
* Attach `'indentList'` and `'outdentList'` commands to `'indent'` and `'outdent'` commands. ([3a67531](https://github.com/ckeditor/ckeditor5-list/commit/3a67531))
|
|
90
|
-
|
|
91
|
-
The `@ckeditor/ckeditor5-indent` feature introduces the "indent" and "outdent" buttons which can be used to manipulate lists and other blocks.
|
|
92
|
-
* Updated translations. ([6c4b520](https://github.com/ckeditor/ckeditor5-list/commit/6c4b520))
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## [12.0.2](https://github.com/ckeditor/ckeditor5-list/compare/v12.0.1...v12.0.2) (2019-06-05)
|
|
96
|
-
|
|
97
|
-
### Other changes
|
|
98
|
-
|
|
99
|
-
* Updated translations. ([b7f3abc](https://github.com/ckeditor/ckeditor5-list/commit/b7f3abc))
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## [12.0.1](https://github.com/ckeditor/ckeditor5-list/compare/v12.0.0...v12.0.1) (2019-04-10)
|
|
103
|
-
|
|
104
|
-
### Other changes
|
|
105
|
-
|
|
106
|
-
* Updated translations. ([d595449](https://github.com/ckeditor/ckeditor5-list/commit/d595449))
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
## [12.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v11.0.3...v12.0.0) (2019-02-28)
|
|
110
|
-
|
|
111
|
-
### Bug fixes
|
|
112
|
-
|
|
113
|
-
* Editor was crashing if multiple, specific block elements were inside list item in loaded/pasted data. Closes [[ckeditor/ckeditor5#1572](https://github.com/ckeditor/ckeditor5/issues/1572)](https://github.com/ckeditor/ckeditor5/issues/1572). ([788eea3](https://github.com/ckeditor/ckeditor5-list/commit/788eea3))
|
|
114
|
-
* Some specific content resulted in creating additional, incorrect list items when loaded. Closes [#121](https://github.com/ckeditor/ckeditor5-list/issues/121). ([50ec81d](https://github.com/ckeditor/ckeditor5-list/commit/50ec81d))
|
|
115
|
-
|
|
116
|
-
### Other changes
|
|
117
|
-
|
|
118
|
-
* Updated translations. ([c61b7fc](https://github.com/ckeditor/ckeditor5-list/commit/c61b7fc)) ([e38333a](https://github.com/ckeditor/ckeditor5-list/commit/e38333a)) ([f26a79c](https://github.com/ckeditor/ckeditor5-list/commit/f26a79c))
|
|
119
|
-
|
|
120
|
-
### BREAKING CHANGES
|
|
121
|
-
|
|
122
|
-
* Upgraded minimal versions of Node to `8.0.0` and npm to `5.7.1`. See: [ckeditor/ckeditor5#1507](https://github.com/ckeditor/ckeditor5/issues/1507). ([612ea3c](https://github.com/ckeditor/ckeditor5-cloud-services/commit/612ea3c))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
## [11.0.3](https://github.com/ckeditor/ckeditor5-list/compare/v11.0.2...v11.0.3) (2018-12-05)
|
|
126
|
-
|
|
127
|
-
### Bug fixes
|
|
128
|
-
|
|
129
|
-
* Block filler will be inserted into the list item if its last child is a `<br>` element. Closes [ckeditor/ckeditor5#1312](https://github.com/ckeditor/ckeditor5/issues/1312). ([cb6708e](https://github.com/ckeditor/ckeditor5-list/commit/cb6708e))
|
|
130
|
-
* Preserve the correct order of block elements inside list items during the view to model conversion. Closes [ckeditor/ckeditor5#1263](https://github.com/ckeditor/ckeditor5/issues/1263). ([abccef4](https://github.com/ckeditor/ckeditor5-list/commit/abccef4))
|
|
131
|
-
|
|
132
|
-
### Other changes
|
|
133
|
-
|
|
134
|
-
* Optimized SVG icons size. See [ckeditor/ckeditor5-theme-lark#206](https://github.com/ckeditor/ckeditor5-theme-lark/issues/206). ([d424329](https://github.com/ckeditor/ckeditor5-list/commit/d424329))
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
## [11.0.2](https://github.com/ckeditor/ckeditor5-list/compare/v11.0.1...v11.0.2) (2018-10-08)
|
|
138
|
-
|
|
139
|
-
### Other changes
|
|
140
|
-
|
|
141
|
-
* Updated translations. ([00fed4b](https://github.com/ckeditor/ckeditor5-list/commit/00fed4b))
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
## [11.0.1](https://github.com/ckeditor/ckeditor5-list/compare/v11.0.0...v11.0.1) (2018-07-18)
|
|
145
|
-
|
|
146
|
-
### Other changes
|
|
147
|
-
|
|
148
|
-
* Updated translations. ([f2d8f6c](https://github.com/ckeditor/ckeditor5-list/commit/f2d8f6c))
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
## [11.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v10.0.0...v11.0.0) (2018-06-21)
|
|
152
|
-
|
|
153
|
-
### Other changes
|
|
154
|
-
|
|
155
|
-
* Rename list attributes `indent` and `type` to `listIndent` and `listType` to avoid collisions with possible generic `type` attribute which could be used on other elements. Closes [#103](https://github.com/ckeditor/ckeditor5-list/issues/103). ([7a1ece6](https://github.com/ckeditor/ckeditor5-list/commit/7a1ece6))
|
|
156
|
-
* Updated translations. ([340ee3d](https://github.com/ckeditor/ckeditor5-list/commit/340ee3d))
|
|
157
|
-
|
|
158
|
-
### BREAKING CHANGES
|
|
159
|
-
|
|
160
|
-
* The `indent` attribute is now called `listIndent`. See [#103](https://github.com/ckeditor/ckeditor5-list/issues/103) for more information.
|
|
161
|
-
* The `type` attribute is now called `listType`. See [#103](https://github.com/ckeditor/ckeditor5-list/issues/103) for more information.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
## [10.0.0](https://github.com/ckeditor/ckeditor5-list/compare/v1.0.0-beta.4...v10.0.0) (2018-04-25)
|
|
165
|
-
|
|
166
|
-
### Other changes
|
|
167
|
-
|
|
168
|
-
* Changed the license to GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991). ([e93f96c](https://github.com/ckeditor/ckeditor5-list/commit/e93f96c))
|
|
169
|
-
|
|
170
|
-
### BREAKING CHANGES
|
|
171
|
-
|
|
172
|
-
* The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-list/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018-04-19)
|
|
176
|
-
|
|
177
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-list/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018-04-10)
|
|
181
|
-
|
|
182
|
-
Internal changes only (updated dependencies, documentation, etc.).
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-list/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018-03-15)
|
|
186
|
-
|
|
187
|
-
### Features
|
|
188
|
-
|
|
189
|
-
* Updated icons for compatibility with the refreshed Lark theme. Minor adjustments in toolbar configurations (see [ckeditor/ckeditor5#645](https://github.com/ckeditor/ckeditor5/issues/645)). ([d1fae4b](https://github.com/ckeditor/ckeditor5-list/commit/d1fae4b))
|
|
190
|
-
|
|
191
|
-
### Other changes
|
|
192
|
-
|
|
193
|
-
* Aligned feature class naming to the new scheme. ([d677fb6](https://github.com/ckeditor/ckeditor5-list/commit/d677fb6))
|
|
194
|
-
* Removed `ViewListItemElement` class and introduced `createViewListItemElement()` utility method. Closes [#89](https://github.com/ckeditor/ckeditor5-list/issues/89). ([e4ac704](https://github.com/ckeditor/ckeditor5-list/commit/e4ac704))
|
|
195
|
-
* Updated translations. ([762a9ed](https://github.com/ckeditor/ckeditor5-list/commit/762a9ed))
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-list/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017-11-14)
|
|
199
|
-
|
|
200
|
-
### Bug fixes
|
|
201
|
-
|
|
202
|
-
* Pressing <kbd>Backspace</kbd> at the beginning of a first list item will turn it into a paragraph instead of merging with the previous block. Closes [#68](https://github.com/ckeditor/ckeditor5-list/issues/68). ([5160277](https://github.com/ckeditor/ckeditor5-list/commit/5160277))
|
|
203
|
-
|
|
204
|
-
### Other changes
|
|
205
|
-
|
|
206
|
-
* Updated translations. ([a1c4477](https://github.com/ckeditor/ckeditor5-list/commit/a1c4477))
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-list/compare/v0.7.0...v1.0.0-alpha.1) (2017-10-03)
|
|
210
|
-
|
|
211
|
-
### Bug fixes
|
|
212
|
-
|
|
213
|
-
* Editor will no longer crash in certain cases during pasting when pasted content could not be converted at all. Closes [#80](https://github.com/ckeditor/ckeditor5-list/issues/80). ([40d0bf5](https://github.com/ckeditor/ckeditor5-list/commit/40d0bf5))
|
|
214
|
-
* Editor will no longer crash when spellchecker corrects a word inside list item in a certain scenario. Closes [#70](https://github.com/ckeditor/ckeditor5-list/issues/70). ([f0b8b44](https://github.com/ckeditor/ckeditor5-list/commit/f0b8b44))
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
## [0.7.0](https://github.com/ckeditor/ckeditor5-list/compare/v0.6.1...v0.7.0) (2017-09-03)
|
|
218
|
-
|
|
219
|
-
### Bug fixes
|
|
220
|
-
|
|
221
|
-
* `ListCommand` should check whether it can be applied to the selection. Closes [#62](https://github.com/ckeditor/ckeditor5-list/issues/62). ([12b77ae](https://github.com/ckeditor/ckeditor5-list/commit/12b77ae))
|
|
222
|
-
* `view.UIElement` will no longer be incorrectly removed instead of `<li>` element if it was before `<li>` element to remove. Closes [#74](https://github.com/ckeditor/ckeditor5-list/issues/74). ([aa7855c](https://github.com/ckeditor/ckeditor5-list/commit/aa7855c))
|
|
223
|
-
* Fixed a bug when editor sometimes crashed when list item was moved outside and before a container in which it was. Closes [#78](https://github.com/ckeditor/ckeditor5-list/issues/78). ([3d8814e](https://github.com/ckeditor/ckeditor5-list/commit/3d8814e))
|
|
224
|
-
* List model fixer will not be triggered if a change-to-fix is in a `transparent` batch. ([0779f35](https://github.com/ckeditor/ckeditor5-list/commit/0779f35))
|
|
225
|
-
* `<ul>` and `<ol>` view elements will now be inserted after view UI elements. Closes [#71](https://github.com/ckeditor/ckeditor5-list/issues/71). ([0e85b2f](https://github.com/ckeditor/ckeditor5-list/commit/0e85b2f))
|
|
226
|
-
* The `ListEngine` plugin will not crash editor when using `DataController#insertContent()` with model items (it worked with data fragments only). Closes [#69](https://github.com/ckeditor/ckeditor5-list/issues/69). ([e0216a8](https://github.com/ckeditor/ckeditor5-list/commit/e0216a8))
|
|
227
|
-
|
|
228
|
-
### Features
|
|
229
|
-
|
|
230
|
-
* List feature should use `EditingKeystrokeHandler` instead of direct event listeners. Closes [#76](https://github.com/ckeditor/ckeditor5-list/issues/76). ([aaf362c](https://github.com/ckeditor/ckeditor5-list/commit/aaf362c))
|
|
231
|
-
|
|
232
|
-
### Other changes
|
|
233
|
-
|
|
234
|
-
* Aligned the implementation to the new Command API (see https://github.com/ckeditor/ckeditor5-core/issues/88). ([9a7d596](https://github.com/ckeditor/ckeditor5-list/commit/9a7d596))
|
|
235
|
-
* Cleaning up svg icons. ([2d423db](https://github.com/ckeditor/ckeditor5-list/commit/2d423db))
|
|
236
|
-
|
|
237
|
-
### BREAKING CHANGES
|
|
238
|
-
|
|
239
|
-
* The command API has been changed.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
## [0.6.1](https://github.com/ckeditor/ckeditor5-list/compare/v0.6.0...v0.6.1) (2017-05-07)
|
|
243
|
-
|
|
244
|
-
### Bug fixes
|
|
245
|
-
|
|
246
|
-
* List's view-to-model converter now returns `model.DocumentFragment` containing `listItem` model elements, instead of an array. Closes [#60](https://github.com/ckeditor/ckeditor5/issues/60). ([331242d](https://github.com/ckeditor/ckeditor5-list/commit/331242d))
|
|
247
|
-
* Pasted list items' indentation will now be correctly adjusted if they are pasted into a nested list. Closes [#56](https://github.com/ckeditor/ckeditor5-list/issues/56). ([e91c3d1](https://github.com/ckeditor/ckeditor5-list/commit/e91c3d1))
|
|
248
|
-
|
|
249
|
-
### Other changes
|
|
250
|
-
|
|
251
|
-
* Updated translations. ([bd83eed](https://github.com/ckeditor/ckeditor5-list/commit/bd83eed))
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
## [0.6.0](https://github.com/ckeditor/ckeditor5-list/compare/v0.5.1...v0.6.0) (2017-04-05)
|
|
255
|
-
|
|
256
|
-
### Features
|
|
257
|
-
|
|
258
|
-
* Added support for nested lists. ([237b06e](https://github.com/ckeditor/ckeditor5-list/commit/237b06e)), closes [#8](https://github.com/ckeditor/ckeditor5-list/issues/8) [#9](https://github.com/ckeditor/ckeditor5-list/issues/9) [#30](https://github.com/ckeditor/ckeditor5-list/issues/30) [#36](https://github.com/ckeditor/ckeditor5-list/issues/36) [#37](https://github.com/ckeditor/ckeditor5-list/issues/37) [#38](https://github.com/ckeditor/ckeditor5-list/issues/38) [#39](https://github.com/ckeditor/ckeditor5-list/issues/39) [#40](https://github.com/ckeditor/ckeditor5-list/issues/40) [#41](https://github.com/ckeditor/ckeditor5-list/issues/41) [#44](https://github.com/ckeditor/ckeditor5-list/issues/44) [#45](https://github.com/ckeditor/ckeditor5-list/issues/45).
|
|
259
|
-
* Named existing plugin(s). ([09e5c27](https://github.com/ckeditor/ckeditor5-list/commit/09e5c27))
|
|
260
|
-
|
|
261
|
-
### Other changes
|
|
262
|
-
|
|
263
|
-
* Updated translations. ([cabcd67](https://github.com/ckeditor/ckeditor5-list/commit/cabcd67))
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
## [0.5.1](https://github.com/ckeditor/ckeditor5-list/compare/v0.5.0...v0.5.1) (2017-03-06)
|
|
267
|
-
|
|
268
|
-
### Other changes
|
|
269
|
-
|
|
270
|
-
* Made the list feature use the `model.Selection#getSelectedBlocks()` instead of implementing the same logic itself. Closes [#32](https://github.com/ckeditor/ckeditor5/issues/32). Closes [#31](https://github.com/ckeditor/ckeditor5/issues/31). ([d04eab5](https://github.com/ckeditor/ckeditor5-list/commit/d04eab5))
|
|
271
|
-
* Stop using `ModelConversionDispatcher#event:move` for list conversion. ([04e9e56](https://github.com/ckeditor/ckeditor5-list/commit/04e9e56))
|
|
272
|
-
* Updated translations. ([8b92825](https://github.com/ckeditor/ckeditor5-list/commit/8b92825))
|
package/src/liststyleui.js
DELETED
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @module list/liststyleui
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
11
|
-
import { ButtonView, SplitButtonView, createDropdown, addToolbarToDropdown } from 'ckeditor5/src/ui';
|
|
12
|
-
|
|
13
|
-
import bulletedListIcon from '../theme/icons/bulletedlist.svg';
|
|
14
|
-
import numberedListIcon from '../theme/icons/numberedlist.svg';
|
|
15
|
-
|
|
16
|
-
import listStyleDiscIcon from '../theme/icons/liststyledisc.svg';
|
|
17
|
-
import listStyleCircleIcon from '../theme/icons/liststylecircle.svg';
|
|
18
|
-
import listStyleSquareIcon from '../theme/icons/liststylesquare.svg';
|
|
19
|
-
import listStyleDecimalIcon from '../theme/icons/liststyledecimal.svg';
|
|
20
|
-
import listStyleDecimalWithLeadingZeroIcon from '../theme/icons/liststyledecimalleadingzero.svg';
|
|
21
|
-
import listStyleLowerRomanIcon from '../theme/icons/liststylelowerroman.svg';
|
|
22
|
-
import listStyleUpperRomanIcon from '../theme/icons/liststyleupperroman.svg';
|
|
23
|
-
import listStyleLowerLatinIcon from '../theme/icons/liststylelowerlatin.svg';
|
|
24
|
-
import listStyleUpperLatinIcon from '../theme/icons/liststyleupperlatin.svg';
|
|
25
|
-
|
|
26
|
-
import '../theme/liststyles.css';
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* The list style UI plugin. It introduces the extended `'bulletedList'` and `'numberedList'` toolbar
|
|
30
|
-
* buttons that allow users to change styles of individual lists in the content.
|
|
31
|
-
*
|
|
32
|
-
* **Note**: Buttons introduced by this plugin override implementations from the {@link module:list/listui~ListUI}
|
|
33
|
-
* (because they share the same names).
|
|
34
|
-
*
|
|
35
|
-
* @extends module:core/plugin~Plugin
|
|
36
|
-
*/
|
|
37
|
-
export default class ListStyleUI extends Plugin {
|
|
38
|
-
/**
|
|
39
|
-
* @inheritDoc
|
|
40
|
-
*/
|
|
41
|
-
static get pluginName() {
|
|
42
|
-
return 'ListStyleUI';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
init() {
|
|
46
|
-
const editor = this.editor;
|
|
47
|
-
const t = editor.locale.t;
|
|
48
|
-
|
|
49
|
-
editor.ui.componentFactory.add( 'bulletedList', getSplitButtonCreator( {
|
|
50
|
-
editor,
|
|
51
|
-
parentCommandName: 'bulletedList',
|
|
52
|
-
buttonLabel: t( 'Bulleted List' ),
|
|
53
|
-
buttonIcon: bulletedListIcon,
|
|
54
|
-
toolbarAriaLabel: t( 'Bulleted list styles toolbar' ),
|
|
55
|
-
styleDefinitions: [
|
|
56
|
-
{
|
|
57
|
-
label: t( 'Toggle the disc list style' ),
|
|
58
|
-
tooltip: t( 'Disc' ),
|
|
59
|
-
type: 'disc',
|
|
60
|
-
icon: listStyleDiscIcon
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
label: t( 'Toggle the circle list style' ),
|
|
64
|
-
tooltip: t( 'Circle' ),
|
|
65
|
-
type: 'circle',
|
|
66
|
-
icon: listStyleCircleIcon
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
label: t( 'Toggle the square list style' ),
|
|
70
|
-
tooltip: t( 'Square' ),
|
|
71
|
-
type: 'square',
|
|
72
|
-
icon: listStyleSquareIcon
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
} ) );
|
|
76
|
-
|
|
77
|
-
editor.ui.componentFactory.add( 'numberedList', getSplitButtonCreator( {
|
|
78
|
-
editor,
|
|
79
|
-
parentCommandName: 'numberedList',
|
|
80
|
-
buttonLabel: t( 'Numbered List' ),
|
|
81
|
-
buttonIcon: numberedListIcon,
|
|
82
|
-
toolbarAriaLabel: t( 'Numbered list styles toolbar' ),
|
|
83
|
-
styleDefinitions: [
|
|
84
|
-
{
|
|
85
|
-
label: t( 'Toggle the decimal list style' ),
|
|
86
|
-
tooltip: t( 'Decimal' ),
|
|
87
|
-
type: 'decimal',
|
|
88
|
-
icon: listStyleDecimalIcon
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
label: t( 'Toggle the decimal with leading zero list style' ),
|
|
92
|
-
tooltip: t( 'Decimal with leading zero' ),
|
|
93
|
-
type: 'decimal-leading-zero',
|
|
94
|
-
icon: listStyleDecimalWithLeadingZeroIcon
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
label: t( 'Toggle the lower–roman list style' ),
|
|
98
|
-
tooltip: t( 'Lower–roman' ),
|
|
99
|
-
type: 'lower-roman',
|
|
100
|
-
icon: listStyleLowerRomanIcon
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
label: t( 'Toggle the upper–roman list style' ),
|
|
104
|
-
tooltip: t( 'Upper-roman' ),
|
|
105
|
-
type: 'upper-roman',
|
|
106
|
-
icon: listStyleUpperRomanIcon
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
label: t( 'Toggle the lower–latin list style' ),
|
|
110
|
-
tooltip: t( 'Lower-latin' ),
|
|
111
|
-
type: 'lower-latin',
|
|
112
|
-
icon: listStyleLowerLatinIcon
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: t( 'Toggle the upper–latin list style' ),
|
|
116
|
-
tooltip: t( 'Upper-latin' ),
|
|
117
|
-
type: 'upper-latin',
|
|
118
|
-
icon: listStyleUpperLatinIcon
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
} ) );
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// A helper that returns a function that creates a split button with a toolbar in the dropdown,
|
|
126
|
-
// which in turn contains buttons allowing users to change list styles in the context of the current selection.
|
|
127
|
-
//
|
|
128
|
-
// @param {Object} options
|
|
129
|
-
// @param {module:core/editor/editor~Editor} options.editor
|
|
130
|
-
// @param {'bulletedList'|'numberedList'} options.parentCommandName The name of the higher-order editor command associated with
|
|
131
|
-
// the set of particular list styles (e.g. "bulletedList" for "disc", "circle", and "square" styles).
|
|
132
|
-
// @param {String} options.buttonLabel Label of the main part of the split button.
|
|
133
|
-
// @param {String} options.buttonIcon The SVG string of an icon for the main part of the split button.
|
|
134
|
-
// @param {String} options.toolbarAriaLabel The ARIA label for the toolbar in the split button dropdown.
|
|
135
|
-
// @param {Object} options.styleDefinitions Definitions of the style buttons.
|
|
136
|
-
// @returns {Function} A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.
|
|
137
|
-
function getSplitButtonCreator( { editor, parentCommandName, buttonLabel, buttonIcon, toolbarAriaLabel, styleDefinitions } ) {
|
|
138
|
-
const parentCommand = editor.commands.get( parentCommandName );
|
|
139
|
-
const listStyleCommand = editor.commands.get( 'listStyle' );
|
|
140
|
-
|
|
141
|
-
// @param {module:utils/locale~Locale} locale
|
|
142
|
-
// @returns {module:ui/dropdown/dropdownview~DropdownView}
|
|
143
|
-
return locale => {
|
|
144
|
-
const dropdownView = createDropdown( locale, SplitButtonView );
|
|
145
|
-
const splitButtonView = dropdownView.buttonView;
|
|
146
|
-
const styleButtonCreator = getStyleButtonCreator( { editor, parentCommandName, listStyleCommand } );
|
|
147
|
-
|
|
148
|
-
addToolbarToDropdown( dropdownView, styleDefinitions.map( styleButtonCreator ) );
|
|
149
|
-
|
|
150
|
-
dropdownView.bind( 'isEnabled' ).to( parentCommand );
|
|
151
|
-
dropdownView.toolbarView.ariaLabel = toolbarAriaLabel;
|
|
152
|
-
dropdownView.class = 'ck-list-styles-dropdown';
|
|
153
|
-
|
|
154
|
-
splitButtonView.on( 'execute', () => {
|
|
155
|
-
editor.execute( parentCommandName );
|
|
156
|
-
editor.editing.view.focus();
|
|
157
|
-
} );
|
|
158
|
-
|
|
159
|
-
splitButtonView.set( {
|
|
160
|
-
label: buttonLabel,
|
|
161
|
-
icon: buttonIcon,
|
|
162
|
-
tooltip: true,
|
|
163
|
-
isToggleable: true
|
|
164
|
-
} );
|
|
165
|
-
|
|
166
|
-
splitButtonView.bind( 'isOn' ).to( parentCommand, 'value', value => !!value );
|
|
167
|
-
|
|
168
|
-
return dropdownView;
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// A helper that returns a function (factory) that creates individual buttons used by users to change styles
|
|
173
|
-
// of lists.
|
|
174
|
-
//
|
|
175
|
-
// @param {Object} options
|
|
176
|
-
// @param {module:core/editor/editor~Editor} options.editor
|
|
177
|
-
// @param {module:list/liststylecommand~ListStylesCommand} options.listStyleCommand The instance of the `ListStylesCommand` class.
|
|
178
|
-
// @param {'bulletedList'|'numberedList'} options.parentCommandName The name of the higher-order command associated with a
|
|
179
|
-
// particular list style (e.g. "bulletedList" is associated with "square" and "numberedList" is associated with "roman").
|
|
180
|
-
// @returns {Function} A function that can be passed straight into {@link module:ui/componentfactory~ComponentFactory#add}.
|
|
181
|
-
function getStyleButtonCreator( { editor, listStyleCommand, parentCommandName } ) {
|
|
182
|
-
const locale = editor.locale;
|
|
183
|
-
const parentCommand = editor.commands.get( parentCommandName );
|
|
184
|
-
|
|
185
|
-
// @param {String} label The label of the style button.
|
|
186
|
-
// @param {String} type The type of the style button (e.g. "roman" or "circle").
|
|
187
|
-
// @param {String} icon The SVG string of an icon of the style button.
|
|
188
|
-
// @param {String} tooltip The tooltip text of the button (shorter than verbose label).
|
|
189
|
-
// @returns {module:ui/button/buttonview~ButtonView}
|
|
190
|
-
return ( { label, type, icon, tooltip } ) => {
|
|
191
|
-
const button = new ButtonView( locale );
|
|
192
|
-
|
|
193
|
-
button.set( { label, icon, tooltip } );
|
|
194
|
-
|
|
195
|
-
listStyleCommand.on( 'change:value', () => {
|
|
196
|
-
button.isOn = listStyleCommand.value === type;
|
|
197
|
-
} );
|
|
198
|
-
|
|
199
|
-
button.on( 'execute', () => {
|
|
200
|
-
// If the content the selection is anchored to is a list, let's change its style.
|
|
201
|
-
if ( parentCommand.value ) {
|
|
202
|
-
// If the current list style is not set in the model or the style is different than the
|
|
203
|
-
// one to be applied, simply apply the new style.
|
|
204
|
-
if ( listStyleCommand.value !== type ) {
|
|
205
|
-
editor.execute( 'listStyle', { type } );
|
|
206
|
-
}
|
|
207
|
-
// If the style was the same, remove it (the button works as an off toggle).
|
|
208
|
-
else {
|
|
209
|
-
editor.execute( 'listStyle', { type: listStyleCommand._defaultType } );
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// If the content the selection is anchored to is not a list, let's create a list of a desired style.
|
|
213
|
-
else {
|
|
214
|
-
editor.model.change( () => {
|
|
215
|
-
editor.execute( parentCommandName );
|
|
216
|
-
editor.execute( 'listStyle', { type } );
|
|
217
|
-
} );
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
editor.editing.view.focus();
|
|
221
|
-
} );
|
|
222
|
-
|
|
223
|
-
return button;
|
|
224
|
-
};
|
|
225
|
-
}
|