@ckeditor/ckeditor5-core 44.3.0 → 45.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/index.js +7 -214
  3. package/dist/index.js.map +1 -1
  4. package/dist/translations/af.js +1 -1
  5. package/dist/translations/af.umd.js +1 -1
  6. package/dist/translations/ar.js +1 -1
  7. package/dist/translations/ar.umd.js +1 -1
  8. package/dist/translations/ast.js +1 -1
  9. package/dist/translations/ast.umd.js +1 -1
  10. package/dist/translations/az.js +1 -1
  11. package/dist/translations/az.umd.js +1 -1
  12. package/dist/translations/be.d.ts +8 -0
  13. package/dist/translations/be.js +5 -0
  14. package/dist/translations/be.umd.js +11 -0
  15. package/dist/translations/bg.js +1 -1
  16. package/dist/translations/bg.umd.js +1 -1
  17. package/dist/translations/bn.js +1 -1
  18. package/dist/translations/bn.umd.js +1 -1
  19. package/dist/translations/bs.js +1 -1
  20. package/dist/translations/bs.umd.js +1 -1
  21. package/dist/translations/ca.js +1 -1
  22. package/dist/translations/ca.umd.js +1 -1
  23. package/dist/translations/cs.js +1 -1
  24. package/dist/translations/cs.umd.js +1 -1
  25. package/dist/translations/da.js +1 -1
  26. package/dist/translations/da.umd.js +1 -1
  27. package/dist/translations/de-ch.js +1 -1
  28. package/dist/translations/de-ch.umd.js +1 -1
  29. package/dist/translations/de.js +1 -1
  30. package/dist/translations/de.umd.js +1 -1
  31. package/dist/translations/el.js +1 -1
  32. package/dist/translations/el.umd.js +1 -1
  33. package/dist/translations/en-au.js +1 -1
  34. package/dist/translations/en-au.umd.js +1 -1
  35. package/dist/translations/en-gb.js +1 -1
  36. package/dist/translations/en-gb.umd.js +1 -1
  37. package/dist/translations/en.js +1 -1
  38. package/dist/translations/en.umd.js +1 -1
  39. package/dist/translations/eo.js +1 -1
  40. package/dist/translations/eo.umd.js +1 -1
  41. package/dist/translations/es-co.js +1 -1
  42. package/dist/translations/es-co.umd.js +1 -1
  43. package/dist/translations/es.js +1 -1
  44. package/dist/translations/es.umd.js +1 -1
  45. package/dist/translations/et.js +1 -1
  46. package/dist/translations/et.umd.js +1 -1
  47. package/dist/translations/eu.js +1 -1
  48. package/dist/translations/eu.umd.js +1 -1
  49. package/dist/translations/fa.js +1 -1
  50. package/dist/translations/fa.umd.js +1 -1
  51. package/dist/translations/fi.js +1 -1
  52. package/dist/translations/fi.umd.js +1 -1
  53. package/dist/translations/fr.js +1 -1
  54. package/dist/translations/fr.umd.js +1 -1
  55. package/dist/translations/gl.js +1 -1
  56. package/dist/translations/gl.umd.js +1 -1
  57. package/dist/translations/gu.js +1 -1
  58. package/dist/translations/gu.umd.js +1 -1
  59. package/dist/translations/he.js +1 -1
  60. package/dist/translations/he.umd.js +1 -1
  61. package/dist/translations/hi.js +1 -1
  62. package/dist/translations/hi.umd.js +1 -1
  63. package/dist/translations/hr.js +1 -1
  64. package/dist/translations/hr.umd.js +1 -1
  65. package/dist/translations/hu.js +1 -1
  66. package/dist/translations/hu.umd.js +1 -1
  67. package/dist/translations/hy.js +1 -1
  68. package/dist/translations/hy.umd.js +1 -1
  69. package/dist/translations/id.js +1 -1
  70. package/dist/translations/id.umd.js +1 -1
  71. package/dist/translations/it.js +1 -1
  72. package/dist/translations/it.umd.js +1 -1
  73. package/dist/translations/ja.js +1 -1
  74. package/dist/translations/ja.umd.js +1 -1
  75. package/dist/translations/jv.js +1 -1
  76. package/dist/translations/jv.umd.js +1 -1
  77. package/dist/translations/kk.js +1 -1
  78. package/dist/translations/kk.umd.js +1 -1
  79. package/dist/translations/km.js +1 -1
  80. package/dist/translations/km.umd.js +1 -1
  81. package/dist/translations/kn.js +1 -1
  82. package/dist/translations/kn.umd.js +1 -1
  83. package/dist/translations/ko.js +1 -1
  84. package/dist/translations/ko.umd.js +1 -1
  85. package/dist/translations/ku.js +1 -1
  86. package/dist/translations/ku.umd.js +1 -1
  87. package/dist/translations/lt.js +1 -1
  88. package/dist/translations/lt.umd.js +1 -1
  89. package/dist/translations/lv.js +1 -1
  90. package/dist/translations/lv.umd.js +1 -1
  91. package/dist/translations/ms.js +1 -1
  92. package/dist/translations/ms.umd.js +1 -1
  93. package/dist/translations/nb.js +1 -1
  94. package/dist/translations/nb.umd.js +1 -1
  95. package/dist/translations/ne.js +1 -1
  96. package/dist/translations/ne.umd.js +1 -1
  97. package/dist/translations/nl.js +1 -1
  98. package/dist/translations/nl.umd.js +1 -1
  99. package/dist/translations/no.js +1 -1
  100. package/dist/translations/no.umd.js +1 -1
  101. package/dist/translations/oc.js +1 -1
  102. package/dist/translations/oc.umd.js +1 -1
  103. package/dist/translations/pl.js +1 -1
  104. package/dist/translations/pl.umd.js +1 -1
  105. package/dist/translations/pt-br.js +1 -1
  106. package/dist/translations/pt-br.umd.js +1 -1
  107. package/dist/translations/pt.js +1 -1
  108. package/dist/translations/pt.umd.js +1 -1
  109. package/dist/translations/ro.js +1 -1
  110. package/dist/translations/ro.umd.js +1 -1
  111. package/dist/translations/ru.js +1 -1
  112. package/dist/translations/ru.umd.js +1 -1
  113. package/dist/translations/si.js +1 -1
  114. package/dist/translations/si.umd.js +1 -1
  115. package/dist/translations/sk.js +1 -1
  116. package/dist/translations/sk.umd.js +1 -1
  117. package/dist/translations/sl.js +1 -1
  118. package/dist/translations/sl.umd.js +1 -1
  119. package/dist/translations/sq.js +1 -1
  120. package/dist/translations/sq.umd.js +1 -1
  121. package/dist/translations/sr-latn.js +1 -1
  122. package/dist/translations/sr-latn.umd.js +1 -1
  123. package/dist/translations/sr.js +1 -1
  124. package/dist/translations/sr.umd.js +1 -1
  125. package/dist/translations/sv.js +1 -1
  126. package/dist/translations/sv.umd.js +1 -1
  127. package/dist/translations/th.js +1 -1
  128. package/dist/translations/th.umd.js +1 -1
  129. package/dist/translations/ti.js +1 -1
  130. package/dist/translations/ti.umd.js +1 -1
  131. package/dist/translations/tk.js +1 -1
  132. package/dist/translations/tk.umd.js +1 -1
  133. package/dist/translations/tr.js +1 -1
  134. package/dist/translations/tr.umd.js +1 -1
  135. package/dist/translations/tt.js +1 -1
  136. package/dist/translations/tt.umd.js +1 -1
  137. package/dist/translations/ug.js +1 -1
  138. package/dist/translations/ug.umd.js +1 -1
  139. package/dist/translations/uk.js +1 -1
  140. package/dist/translations/uk.umd.js +1 -1
  141. package/dist/translations/ur.js +1 -1
  142. package/dist/translations/ur.umd.js +1 -1
  143. package/dist/translations/uz.js +1 -1
  144. package/dist/translations/uz.umd.js +1 -1
  145. package/dist/translations/vi.js +1 -1
  146. package/dist/translations/vi.umd.js +1 -1
  147. package/dist/translations/zh-cn.js +1 -1
  148. package/dist/translations/zh-cn.umd.js +1 -1
  149. package/dist/translations/zh.js +1 -1
  150. package/dist/translations/zh.umd.js +1 -1
  151. package/lang/contexts.json +14 -1
  152. package/lang/translations/af.po +52 -0
  153. package/lang/translations/ar.po +52 -0
  154. package/lang/translations/ast.po +52 -0
  155. package/lang/translations/az.po +52 -0
  156. package/lang/translations/be.po +196 -0
  157. package/lang/translations/bg.po +52 -0
  158. package/lang/translations/bn.po +52 -0
  159. package/lang/translations/bs.po +52 -0
  160. package/lang/translations/ca.po +52 -0
  161. package/lang/translations/cs.po +52 -0
  162. package/lang/translations/da.po +52 -0
  163. package/lang/translations/de-ch.po +52 -0
  164. package/lang/translations/de.po +52 -0
  165. package/lang/translations/el.po +52 -0
  166. package/lang/translations/en-au.po +52 -0
  167. package/lang/translations/en-gb.po +52 -0
  168. package/lang/translations/en.po +52 -0
  169. package/lang/translations/eo.po +52 -0
  170. package/lang/translations/es-co.po +52 -0
  171. package/lang/translations/es.po +52 -0
  172. package/lang/translations/et.po +52 -0
  173. package/lang/translations/eu.po +52 -0
  174. package/lang/translations/fa.po +52 -0
  175. package/lang/translations/fi.po +52 -0
  176. package/lang/translations/fr.po +52 -0
  177. package/lang/translations/gl.po +52 -0
  178. package/lang/translations/gu.po +52 -0
  179. package/lang/translations/he.po +52 -0
  180. package/lang/translations/hi.po +52 -0
  181. package/lang/translations/hr.po +52 -0
  182. package/lang/translations/hu.po +52 -0
  183. package/lang/translations/hy.po +52 -0
  184. package/lang/translations/id.po +52 -0
  185. package/lang/translations/it.po +52 -0
  186. package/lang/translations/ja.po +52 -0
  187. package/lang/translations/jv.po +52 -0
  188. package/lang/translations/kk.po +52 -0
  189. package/lang/translations/km.po +52 -0
  190. package/lang/translations/kn.po +52 -0
  191. package/lang/translations/ko.po +52 -0
  192. package/lang/translations/ku.po +52 -0
  193. package/lang/translations/lt.po +52 -0
  194. package/lang/translations/lv.po +52 -0
  195. package/lang/translations/ms.po +52 -0
  196. package/lang/translations/nb.po +52 -0
  197. package/lang/translations/ne.po +52 -0
  198. package/lang/translations/nl.po +52 -0
  199. package/lang/translations/no.po +52 -0
  200. package/lang/translations/oc.po +52 -0
  201. package/lang/translations/pl.po +52 -0
  202. package/lang/translations/pt-br.po +52 -0
  203. package/lang/translations/pt.po +52 -0
  204. package/lang/translations/ro.po +52 -0
  205. package/lang/translations/ru.po +52 -0
  206. package/lang/translations/si.po +52 -0
  207. package/lang/translations/sk.po +52 -0
  208. package/lang/translations/sl.po +52 -0
  209. package/lang/translations/sq.po +52 -0
  210. package/lang/translations/sr-latn.po +52 -0
  211. package/lang/translations/sr.po +52 -0
  212. package/lang/translations/sv.po +52 -0
  213. package/lang/translations/th.po +52 -0
  214. package/lang/translations/ti.po +52 -0
  215. package/lang/translations/tk.po +52 -0
  216. package/lang/translations/tr.po +52 -0
  217. package/lang/translations/tt.po +52 -0
  218. package/lang/translations/ug.po +52 -0
  219. package/lang/translations/uk.po +52 -0
  220. package/lang/translations/ur.po +52 -0
  221. package/lang/translations/uz.po +52 -0
  222. package/lang/translations/vi.po +52 -0
  223. package/lang/translations/zh-cn.po +52 -0
  224. package/lang/translations/zh.po +52 -0
  225. package/package.json +6 -8
  226. package/src/accessibility.js +22 -18
  227. package/src/command.js +25 -0
  228. package/src/commandcollection.js +4 -0
  229. package/src/context.js +82 -7
  230. package/src/contextplugin.js +4 -0
  231. package/src/editingkeystrokehandler.js +4 -0
  232. package/src/editor/editor.js +197 -19
  233. package/src/editor/utils/attachtoform.js +1 -1
  234. package/src/editor/utils/elementapimixin.js +1 -0
  235. package/src/index.d.ts +0 -70
  236. package/src/index.js +0 -138
  237. package/src/multicommand.js +4 -7
  238. package/src/pendingactions.js +4 -0
  239. package/src/plugin.js +16 -4
  240. package/src/plugincollection.js +15 -6
  241. package/theme/icons/align-bottom.svg +0 -1
  242. package/theme/icons/align-center.svg +0 -1
  243. package/theme/icons/align-justify.svg +0 -1
  244. package/theme/icons/align-left.svg +0 -1
  245. package/theme/icons/align-middle.svg +0 -1
  246. package/theme/icons/align-right.svg +0 -1
  247. package/theme/icons/align-top.svg +0 -1
  248. package/theme/icons/bold.svg +0 -1
  249. package/theme/icons/bookmark.svg +0 -1
  250. package/theme/icons/bookmark_inline.svg +0 -1
  251. package/theme/icons/browse-files.svg +0 -1
  252. package/theme/icons/bulletedlist.svg +0 -1
  253. package/theme/icons/cancel.svg +0 -1
  254. package/theme/icons/caption.svg +0 -1
  255. package/theme/icons/check.svg +0 -1
  256. package/theme/icons/codeblock.svg +0 -1
  257. package/theme/icons/cog.svg +0 -1
  258. package/theme/icons/color-palette.svg +0 -1
  259. package/theme/icons/drag-indicator.svg +0 -1
  260. package/theme/icons/emoji.svg +0 -1
  261. package/theme/icons/eraser.svg +0 -1
  262. package/theme/icons/heading1.svg +0 -1
  263. package/theme/icons/heading2.svg +0 -1
  264. package/theme/icons/heading3.svg +0 -1
  265. package/theme/icons/heading4.svg +0 -1
  266. package/theme/icons/heading5.svg +0 -1
  267. package/theme/icons/heading6.svg +0 -1
  268. package/theme/icons/history.svg +0 -1
  269. package/theme/icons/horizontalline.svg +0 -1
  270. package/theme/icons/html.svg +0 -1
  271. package/theme/icons/image-asset-manager.svg +0 -1
  272. package/theme/icons/image-upload.svg +0 -1
  273. package/theme/icons/image-url.svg +0 -1
  274. package/theme/icons/image.svg +0 -1
  275. package/theme/icons/importexport.svg +0 -1
  276. package/theme/icons/indent.svg +0 -1
  277. package/theme/icons/loupe.svg +0 -1
  278. package/theme/icons/low-vision.svg +0 -1
  279. package/theme/icons/next-arrow.svg +0 -1
  280. package/theme/icons/numberedlist.svg +0 -1
  281. package/theme/icons/object-center.svg +0 -1
  282. package/theme/icons/object-full-width.svg +0 -1
  283. package/theme/icons/object-inline-left.svg +0 -1
  284. package/theme/icons/object-inline-right.svg +0 -1
  285. package/theme/icons/object-inline.svg +0 -1
  286. package/theme/icons/object-left.svg +0 -1
  287. package/theme/icons/object-right.svg +0 -1
  288. package/theme/icons/object-size-custom.svg +0 -1
  289. package/theme/icons/object-size-full.svg +0 -1
  290. package/theme/icons/object-size-large.svg +0 -1
  291. package/theme/icons/object-size-medium.svg +0 -1
  292. package/theme/icons/object-size-small.svg +0 -1
  293. package/theme/icons/outdent.svg +0 -1
  294. package/theme/icons/paragraph.svg +0 -1
  295. package/theme/icons/pencil.svg +0 -1
  296. package/theme/icons/pilcrow.svg +0 -1
  297. package/theme/icons/plus.svg +0 -1
  298. package/theme/icons/previous-arrow.svg +0 -1
  299. package/theme/icons/quote.svg +0 -1
  300. package/theme/icons/redo.svg +0 -1
  301. package/theme/icons/remove.svg +0 -1
  302. package/theme/icons/source.svg +0 -1
  303. package/theme/icons/table.svg +0 -1
  304. package/theme/icons/text-alternative.svg +0 -1
  305. package/theme/icons/text.svg +0 -1
  306. package/theme/icons/three-vertical-dots.svg +0 -1
  307. package/theme/icons/todolist.svg +0 -1
  308. package/theme/icons/undo.svg +0 -1
@@ -142,3 +142,55 @@ msgstr "请尝试使用不同的短语或检查拼写。"
142
142
  msgctxt "The label of the source editing related features used in toolbar buttons."
143
143
  msgid "Source"
144
144
  msgstr "源"
145
+
146
+ msgctxt "Label for the Insert button."
147
+ msgid "Insert"
148
+ msgstr ""
149
+
150
+ msgctxt "Label for the Update button."
151
+ msgid "Update"
152
+ msgstr ""
153
+
154
+ msgctxt "Label for the Back button."
155
+ msgid "Back"
156
+ msgstr ""
157
+
158
+ msgctxt "Part of the date label used to describe the past days of the week (e.g., 'Last Monday'). Used for comments and suggestions."
159
+ msgid "Last"
160
+ msgstr ""
161
+
162
+ msgctxt "Label for \"Today\". Used as a date label for comments and suggestions."
163
+ msgid "Today"
164
+ msgstr ""
165
+
166
+ msgctxt "Label for \"Yesterday\". Used as a date label for comments and suggestions."
167
+ msgid "Yesterday"
168
+ msgstr ""
169
+
170
+ msgctxt "Name of \"Monday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Monday') for comments and suggestions."
171
+ msgid "Monday"
172
+ msgstr ""
173
+
174
+ msgctxt "Name of \"Tuesday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Tuesday') for comments and suggestions."
175
+ msgid "Tuesday"
176
+ msgstr ""
177
+
178
+ msgctxt "Name of \"Wednesday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Wednesday') for comments and suggestions."
179
+ msgid "Wednesday"
180
+ msgstr ""
181
+
182
+ msgctxt "Name of \"Thursday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Thursday') for comments and suggestions."
183
+ msgid "Thursday"
184
+ msgstr ""
185
+
186
+ msgctxt "Name of \"Friday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Friday') for comments and suggestions."
187
+ msgid "Friday"
188
+ msgstr ""
189
+
190
+ msgctxt "Name of \"Saturday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Saturday') for comments and suggestions."
191
+ msgid "Saturday"
192
+ msgstr ""
193
+
194
+ msgctxt "Name of \"Sunday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Sunday') for comments and suggestions."
195
+ msgid "Sunday"
196
+ msgstr ""
@@ -142,3 +142,55 @@ msgstr "請嘗試其他詞彙或確認拼寫是否正確。"
142
142
  msgctxt "The label of the source editing related features used in toolbar buttons."
143
143
  msgid "Source"
144
144
  msgstr "原始碼"
145
+
146
+ msgctxt "Label for the Insert button."
147
+ msgid "Insert"
148
+ msgstr ""
149
+
150
+ msgctxt "Label for the Update button."
151
+ msgid "Update"
152
+ msgstr ""
153
+
154
+ msgctxt "Label for the Back button."
155
+ msgid "Back"
156
+ msgstr ""
157
+
158
+ msgctxt "Part of the date label used to describe the past days of the week (e.g., 'Last Monday'). Used for comments and suggestions."
159
+ msgid "Last"
160
+ msgstr ""
161
+
162
+ msgctxt "Label for \"Today\". Used as a date label for comments and suggestions."
163
+ msgid "Today"
164
+ msgstr ""
165
+
166
+ msgctxt "Label for \"Yesterday\". Used as a date label for comments and suggestions."
167
+ msgid "Yesterday"
168
+ msgstr ""
169
+
170
+ msgctxt "Name of \"Monday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Monday') for comments and suggestions."
171
+ msgid "Monday"
172
+ msgstr ""
173
+
174
+ msgctxt "Name of \"Tuesday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Tuesday') for comments and suggestions."
175
+ msgid "Tuesday"
176
+ msgstr ""
177
+
178
+ msgctxt "Name of \"Wednesday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Wednesday') for comments and suggestions."
179
+ msgid "Wednesday"
180
+ msgstr ""
181
+
182
+ msgctxt "Name of \"Thursday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Thursday') for comments and suggestions."
183
+ msgid "Thursday"
184
+ msgstr ""
185
+
186
+ msgctxt "Name of \"Friday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Friday') for comments and suggestions."
187
+ msgid "Friday"
188
+ msgstr ""
189
+
190
+ msgctxt "Name of \"Saturday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Saturday') for comments and suggestions."
191
+ msgid "Saturday"
192
+ msgstr ""
193
+
194
+ msgctxt "Name of \"Sunday\" day of the week. Used as a part of the date label for days of the week (e.g., 'Last Sunday') for comments and suggestions."
195
+ msgid "Sunday"
196
+ msgstr ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-core",
3
- "version": "44.3.0",
3
+ "version": "45.0.0-alpha.1",
4
4
  "description": "The core architecture of CKEditor 5 – the best browser-based rich text editor.",
5
5
  "keywords": [
6
6
  "wysiwyg",
@@ -24,11 +24,11 @@
24
24
  "type": "module",
25
25
  "main": "src/index.js",
26
26
  "dependencies": {
27
- "@ckeditor/ckeditor5-engine": "44.3.0",
28
- "@ckeditor/ckeditor5-ui": "44.3.0",
29
- "@ckeditor/ckeditor5-utils": "44.3.0",
30
- "@ckeditor/ckeditor5-watchdog": "44.3.0",
31
- "lodash-es": "4.17.21"
27
+ "@ckeditor/ckeditor5-engine": "45.0.0-alpha.1",
28
+ "@ckeditor/ckeditor5-ui": "45.0.0-alpha.1",
29
+ "@ckeditor/ckeditor5-utils": "45.0.0-alpha.1",
30
+ "@ckeditor/ckeditor5-watchdog": "45.0.0-alpha.1",
31
+ "es-toolkit": "1.32.0"
32
32
  },
33
33
  "author": "CKSource (http://cksource.com/)",
34
34
  "license": "SEE LICENSE IN LICENSE.md",
@@ -44,7 +44,6 @@
44
44
  "lang",
45
45
  "src/**/*.js",
46
46
  "src/**/*.d.ts",
47
- "theme",
48
47
  "CHANGELOG.md"
49
48
  ],
50
49
  "types": "src/index.d.ts",
@@ -65,7 +64,6 @@
65
64
  "default": "./src/*"
66
65
  },
67
66
  "./lang/*": "./lang/*",
68
- "./theme/*": "./theme/*",
69
67
  "./package.json": "./package.json"
70
68
  }
71
69
  }
@@ -18,28 +18,32 @@ export const DEFAULT_GROUP_ID = 'common';
18
18
  * and {@link #addKeystrokeInfos} methods.
19
19
  */
20
20
  export default class Accessibility {
21
+ /**
22
+ * Stores information about keystrokes brought by editor features for the users to interact with the editor, mainly
23
+ * keystroke combinations and their accessible labels.
24
+ *
25
+ * This information is particularly useful for screen reader and other assistive technology users. It gets displayed
26
+ * by the {@link module:ui/editorui/accessibilityhelp/accessibilityhelp~AccessibilityHelp Accessibility help} dialog.
27
+ *
28
+ * Keystrokes are organized in categories and groups. They can be added using ({@link #addKeystrokeInfoCategory},
29
+ * {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}) methods.
30
+ *
31
+ * Please note that:
32
+ * * two categories are always available:
33
+ * * `'contentEditing'` for keystrokes related to content creation,
34
+ * * `'navigation'` for keystrokes related to navigation in the UI and the content.
35
+ * * unless specified otherwise, new keystrokes are added into the `'contentEditing'` category and the `'common'`
36
+ * keystroke group within that category while using the {@link #addKeystrokeInfos} method.
37
+ */
38
+ keystrokeInfos = new Map();
39
+ /**
40
+ * The editor instance.
41
+ */
42
+ _editor;
21
43
  /**
22
44
  * @inheritDoc
23
45
  */
24
46
  constructor(editor) {
25
- /**
26
- * Stores information about keystrokes brought by editor features for the users to interact with the editor, mainly
27
- * keystroke combinations and their accessible labels.
28
- *
29
- * This information is particularly useful for screen reader and other assistive technology users. It gets displayed
30
- * by the {@link module:ui/editorui/accessibilityhelp/accessibilityhelp~AccessibilityHelp Accessibility help} dialog.
31
- *
32
- * Keystrokes are organized in categories and groups. They can be added using ({@link #addKeystrokeInfoCategory},
33
- * {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}) methods.
34
- *
35
- * Please note that:
36
- * * two categories are always available:
37
- * * `'contentEditing'` for keystrokes related to content creation,
38
- * * `'navigation'` for keystrokes related to navigation in the UI and the content.
39
- * * unless specified otherwise, new keystrokes are added into the `'contentEditing'` category and the `'common'`
40
- * keystroke group within that category while using the {@link #addKeystrokeInfos} method.
41
- */
42
- this.keystrokeInfos = new Map();
43
47
  this._editor = editor;
44
48
  const isMenuBarVisible = editor.config.get('menuBar.isVisible');
45
49
  const t = editor.locale.t;
package/src/command.js CHANGED
@@ -20,6 +20,31 @@ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
20
20
  * but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.
21
21
  */
22
22
  export default class Command extends /* #__PURE__ */ ObservableMixin() {
23
+ /**
24
+ * The editor on which this command will be used.
25
+ */
26
+ editor;
27
+ /**
28
+ * A flag indicating whether a command's `isEnabled` state should be changed depending on where the document
29
+ * selection is placed.
30
+ *
31
+ * By default, it is set to `true`. If the document selection is placed in a
32
+ * {@link module:engine/model/model~Model#canEditAt non-editable} place (such as non-editable root), the command becomes disabled.
33
+ *
34
+ * The flag should be changed to `false` in a concrete command's constructor if the command should not change its `isEnabled`
35
+ * accordingly to the document selection.
36
+ */
37
+ _isEnabledBasedOnSelection;
38
+ /**
39
+ * A flag indicating whether a command execution changes the editor data or not.
40
+ *
41
+ * @see #affectsData
42
+ */
43
+ _affectsData;
44
+ /**
45
+ * Holds identifiers for {@link #forceDisabled} mechanism.
46
+ */
47
+ _disableStack;
23
48
  /**
24
49
  * Creates a new `Command` instance.
25
50
  *
@@ -10,6 +10,10 @@ import { CKEditorError } from '@ckeditor/ckeditor5-utils';
10
10
  * Collection of commands. Its instance is available in {@link module:core/editor/editor~Editor#commands `editor.commands`}.
11
11
  */
12
12
  export default class CommandCollection {
13
+ /**
14
+ * Command map.
15
+ */
16
+ _commands;
13
17
  /**
14
18
  * Creates collection instance.
15
19
  */
package/src/context.js CHANGED
@@ -35,6 +35,88 @@ import PluginCollection from './plugincollection.js';
35
35
  * See {@link ~Context.create `Context.create()`} for usage examples.
36
36
  */
37
37
  export default class Context {
38
+ /**
39
+ * Stores all the configurations specific to this context instance.
40
+ */
41
+ config;
42
+ /**
43
+ * The plugins loaded and in use by this context instance.
44
+ */
45
+ plugins;
46
+ locale;
47
+ /**
48
+ * Shorthand for {@link module:utils/locale~Locale#t}.
49
+ */
50
+ t;
51
+ /**
52
+ * A list of editors that this context instance is injected to.
53
+ */
54
+ editors;
55
+ /**
56
+ * The default configuration which is built into the `Context` class.
57
+ *
58
+ * It is used in CKEditor 5 builds featuring `Context` to provide the default configuration options which are later used during the
59
+ * context initialization.
60
+ *
61
+ * ```ts
62
+ * Context.defaultConfig = {
63
+ * foo: 1,
64
+ * bar: 2
65
+ * };
66
+ *
67
+ * Context
68
+ * .create()
69
+ * .then( context => {
70
+ * context.config.get( 'foo' ); // -> 1
71
+ * context.config.get( 'bar' ); // -> 2
72
+ * } );
73
+ *
74
+ * // The default options can be overridden by the configuration passed to create().
75
+ * Context
76
+ * .create( { bar: 3 } )
77
+ * .then( context => {
78
+ * context.config.get( 'foo' ); // -> 1
79
+ * context.config.get( 'bar' ); // -> 3
80
+ * } );
81
+ * ```
82
+ *
83
+ * See also {@link module:core/context~Context.builtinPlugins `Context.builtinPlugins`}
84
+ * and {@link module:core/editor/editor~Editor.defaultConfig `Editor.defaultConfig`}.
85
+ */
86
+ static defaultConfig;
87
+ /**
88
+ * An array of plugins built into the `Context` class.
89
+ *
90
+ * It is used in CKEditor 5 builds featuring `Context` to provide a list of context plugins which are later automatically initialized
91
+ * during the context initialization.
92
+ *
93
+ * They will be automatically initialized by `Context` unless `config.plugins` is passed.
94
+ *
95
+ * ```ts
96
+ * // Build some context plugins into the Context class first.
97
+ * Context.builtinPlugins = [ FooPlugin, BarPlugin ];
98
+ *
99
+ * // Normally, you need to define config.plugins, but since Context.builtinPlugins was
100
+ * // defined, now you can call create() without any configuration.
101
+ * Context
102
+ * .create()
103
+ * .then( context => {
104
+ * context.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.
105
+ * context.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.
106
+ * } );
107
+ * ```
108
+ *
109
+ * See also {@link module:core/context~Context.defaultConfig `Context.defaultConfig`}
110
+ * and {@link module:core/editor/editor~Editor.builtinPlugins `Editor.builtinPlugins`}.
111
+ */
112
+ static builtinPlugins;
113
+ /**
114
+ * Reference to the editor which created the context.
115
+ * Null when the context was created outside of the editor.
116
+ *
117
+ * It is used to destroy the context when removing the editor that has created the context.
118
+ */
119
+ _contextOwner = null;
38
120
  /**
39
121
  * Creates a context instance with a given configuration.
40
122
  *
@@ -43,13 +125,6 @@ export default class Context {
43
125
  * @param config The context configuration.
44
126
  */
45
127
  constructor(config) {
46
- /**
47
- * Reference to the editor which created the context.
48
- * Null when the context was created outside of the editor.
49
- *
50
- * It is used to destroy the context when removing the editor that has created the context.
51
- */
52
- this._contextOwner = null;
53
128
  // We don't pass translations to the config, because its behavior of splitting keys
54
129
  // with dots (e.g. `resize.width` => `resize: { width }`) breaks the translations.
55
130
  const { translations, ...rest } = config || {};
@@ -21,6 +21,10 @@ import { ObservableMixin } from '@ckeditor/ckeditor5-utils';
21
21
  * * A context plugin MUST NOT require an {@link module:core/plugin~Plugin editor plugin}.
22
22
  */
23
23
  export default class ContextPlugin extends /* #__PURE__ */ ObservableMixin() {
24
+ /**
25
+ * The context or editor instance.
26
+ */
27
+ context;
24
28
  /**
25
29
  * Creates a new plugin instance.
26
30
  */
@@ -20,6 +20,10 @@ import { KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
20
20
  * ```
21
21
  */
22
22
  export default class EditingKeystrokeHandler extends KeystrokeHandler {
23
+ /**
24
+ * The editor instance.
25
+ */
26
+ editor;
23
27
  /**
24
28
  * Creates an instance of the keystroke handler.
25
29
  */
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module core/editor/editor
7
7
  */
8
- import { set, get } from 'lodash-es';
8
+ import { set, get } from 'es-toolkit/compat';
9
9
  import { Config, CKEditorError, ObservableMixin, logError, parseBase64EncodedObject, releaseDate, toArray, uid, crc32 } from '@ckeditor/ckeditor5-utils';
10
10
  import { Conversion, DataController, EditingController, Model, StylesProcessor } from '@ckeditor/ckeditor5-engine';
11
11
  import { ContextWatchdog, EditorWatchdog } from '@ckeditor/ckeditor5-watchdog';
@@ -40,6 +40,184 @@ class Editor extends /* #__PURE__ */ ObservableMixin() {
40
40
  static get editorName() {
41
41
  return 'Editor';
42
42
  }
43
+ /**
44
+ * A namespace for the accessibility features of the editor.
45
+ */
46
+ accessibility;
47
+ /**
48
+ * Commands registered to the editor.
49
+ *
50
+ * Use the shorthand {@link #execute `editor.execute()`} method to execute commands:
51
+ *
52
+ * ```ts
53
+ * // Execute the bold command:
54
+ * editor.execute( 'bold' );
55
+ *
56
+ * // Check the state of the bold command:
57
+ * editor.commands.get( 'bold' ).value;
58
+ * ```
59
+ */
60
+ commands;
61
+ /**
62
+ * Stores all configurations specific to this editor instance.
63
+ *
64
+ * ```ts
65
+ * editor.config.get( 'image.toolbar' );
66
+ * // -> [ 'imageStyle:block', 'imageStyle:side', '|', 'toggleImageCaption', 'imageTextAlternative' ]
67
+ * ```
68
+ */
69
+ config;
70
+ /**
71
+ * Conversion manager through which you can register model-to-view and view-to-model converters.
72
+ *
73
+ * See the {@link module:engine/conversion/conversion~Conversion} documentation to learn how to add converters.
74
+ */
75
+ conversion;
76
+ /**
77
+ * The {@link module:engine/controller/datacontroller~DataController data controller}.
78
+ * Used e.g. for setting and retrieving the editor data.
79
+ */
80
+ data;
81
+ /**
82
+ * The {@link module:engine/controller/editingcontroller~EditingController editing controller}.
83
+ * Controls user input and rendering the content for editing.
84
+ */
85
+ editing;
86
+ /**
87
+ * The locale instance.
88
+ */
89
+ locale;
90
+ /**
91
+ * The editor's model.
92
+ *
93
+ * The central point of the editor's abstract data model.
94
+ */
95
+ model;
96
+ /**
97
+ * The plugins loaded and in use by this editor instance.
98
+ *
99
+ * ```ts
100
+ * editor.plugins.get( 'ClipboardPipeline' ); // -> An instance of the clipboard pipeline plugin.
101
+ * ```
102
+ */
103
+ plugins;
104
+ /**
105
+ * An instance of the {@link module:core/editingkeystrokehandler~EditingKeystrokeHandler}.
106
+ *
107
+ * It allows setting simple keystrokes:
108
+ *
109
+ * ```ts
110
+ * // Execute the bold command on Ctrl+E:
111
+ * editor.keystrokes.set( 'Ctrl+E', 'bold' );
112
+ *
113
+ * // Execute your own callback:
114
+ * editor.keystrokes.set( 'Ctrl+E', ( data, cancel ) => {
115
+ * console.log( data.keyCode );
116
+ *
117
+ * // Prevent the default (native) action and stop the underlying keydown event
118
+ * // so no other editor feature will interfere.
119
+ * cancel();
120
+ * } );
121
+ * ```
122
+ *
123
+ * Note: Certain typing-oriented keystrokes (like <kbd>Backspace</kbd> or <kbd>Enter</kbd>) are handled
124
+ * by a low-level mechanism and trying to listen to them via the keystroke handler will not work reliably.
125
+ * To handle these specific keystrokes, see the events fired by the
126
+ * {@link module:engine/view/document~Document editing view document} (`editor.editing.view.document`).
127
+ */
128
+ keystrokes;
129
+ /**
130
+ * Shorthand for {@link module:utils/locale~Locale#t}.
131
+ *
132
+ * @see module:utils/locale~Locale#t
133
+ */
134
+ t;
135
+ /**
136
+ * The default configuration which is built into the editor class.
137
+ *
138
+ * It is used in CKEditor 5 builds to provide the default configuration options which are later used during the editor initialization.
139
+ *
140
+ * ```ts
141
+ * ClassicEditor.defaultConfig = {
142
+ * foo: 1,
143
+ * bar: 2
144
+ * };
145
+ *
146
+ * ClassicEditor
147
+ * .create( sourceElement )
148
+ * .then( editor => {
149
+ * editor.config.get( 'foo' ); // -> 1
150
+ * editor.config.get( 'bar' ); // -> 2
151
+ * } );
152
+ *
153
+ * // The default options can be overridden by the configuration passed to create().
154
+ * ClassicEditor
155
+ * .create( sourceElement, { bar: 3 } )
156
+ * .then( editor => {
157
+ * editor.config.get( 'foo' ); // -> 1
158
+ * editor.config.get( 'bar' ); // -> 3
159
+ * } );
160
+ * ```
161
+ *
162
+ * See also {@link module:core/editor/editor~Editor.builtinPlugins}.
163
+ */
164
+ static defaultConfig;
165
+ /**
166
+ * An array of plugins built into this editor class.
167
+ *
168
+ * It is used in CKEditor 5 builds to provide a list of plugins which are later automatically initialized
169
+ * during the editor initialization.
170
+ *
171
+ * They will be automatically initialized by the editor, unless listed in `config.removePlugins` and
172
+ * unless `config.plugins` is passed.
173
+ *
174
+ * ```ts
175
+ * // Build some plugins into the editor class first.
176
+ * ClassicEditor.builtinPlugins = [ FooPlugin, BarPlugin ];
177
+ *
178
+ * // Normally, you need to define config.plugins, but since ClassicEditor.builtinPlugins was
179
+ * // defined, now you can call create() without any configuration.
180
+ * ClassicEditor
181
+ * .create( sourceElement )
182
+ * .then( editor => {
183
+ * editor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.
184
+ * editor.plugins.get( BarPlugin ); // -> An instance of the Bar plugin.
185
+ * } );
186
+ *
187
+ * ClassicEditor
188
+ * .create( sourceElement, {
189
+ * // Do not initialize these plugins (note: it is defined by a string):
190
+ * removePlugins: [ 'Foo' ]
191
+ * } )
192
+ * .then( editor => {
193
+ * editor.plugins.get( FooPlugin ); // -> Undefined.
194
+ * editor.config.get( BarPlugin ); // -> An instance of the Bar plugin.
195
+ * } );
196
+ *
197
+ * ClassicEditor
198
+ * .create( sourceElement, {
199
+ * // Load only this plugin. It can also be defined by a string if
200
+ * // this plugin was built into the editor class.
201
+ * plugins: [ FooPlugin ]
202
+ * } )
203
+ * .then( editor => {
204
+ * editor.plugins.get( FooPlugin ); // -> An instance of the Foo plugin.
205
+ * editor.config.get( BarPlugin ); // -> Undefined.
206
+ * } );
207
+ * ```
208
+ *
209
+ * See also {@link module:core/editor/editor~Editor.defaultConfig}.
210
+ */
211
+ static builtinPlugins;
212
+ /**
213
+ * The editor context.
214
+ * When it is not provided through the configuration, the editor creates it.
215
+ */
216
+ _context;
217
+ /**
218
+ * A set of lock IDs for the {@link #isReadOnly} getter.
219
+ */
220
+ _readOnlyLocks;
43
221
  /**
44
222
  * Creates a new instance of the editor class.
45
223
  *
@@ -545,6 +723,24 @@ class Editor extends /* #__PURE__ */ ObservableMixin() {
545
723
  static create(...args) {
546
724
  throw new Error('This is an abstract method.');
547
725
  }
726
+ /**
727
+ * The {@link module:core/context~Context} class.
728
+ *
729
+ * Exposed as static editor field for easier access in editor builds.
730
+ */
731
+ static Context = Context;
732
+ /**
733
+ * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.
734
+ *
735
+ * Exposed as static editor field for easier access in editor builds.
736
+ */
737
+ static EditorWatchdog = EditorWatchdog;
738
+ /**
739
+ * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.
740
+ *
741
+ * Exposed as static editor field for easier access in editor builds.
742
+ */
743
+ static ContextWatchdog = ContextWatchdog;
548
744
  _showLicenseError(reason, pluginName) {
549
745
  setTimeout(() => {
550
746
  if (reason == 'invalid') {
@@ -694,24 +890,6 @@ class Editor extends /* #__PURE__ */ ObservableMixin() {
694
890
  return response.json();
695
891
  }
696
892
  }
697
- /**
698
- * The {@link module:core/context~Context} class.
699
- *
700
- * Exposed as static editor field for easier access in editor builds.
701
- */
702
- Editor.Context = Context;
703
- /**
704
- * The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.
705
- *
706
- * Exposed as static editor field for easier access in editor builds.
707
- */
708
- Editor.EditorWatchdog = EditorWatchdog;
709
- /**
710
- * The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.
711
- *
712
- * Exposed as static editor field for easier access in editor builds.
713
- */
714
- Editor.ContextWatchdog = ContextWatchdog;
715
893
  export default Editor;
716
894
  function collectUsageData(editor) {
717
895
  const collectedData = getEditorUsageData(editor);
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * @module core/editor/utils/attachtoform
7
7
  */
8
- import { isFunction } from 'lodash-es';
8
+ import { isFunction } from 'es-toolkit/compat';
9
9
  import { CKEditorError } from '@ckeditor/ckeditor5-utils';
10
10
  /**
11
11
  * Checks if the editor is initialized on a `<textarea>` element that belongs to a form. If yes, it updates the editor's element
@@ -11,6 +11,7 @@ import { CKEditorError, setDataInElement } from '@ckeditor/ckeditor5-utils';
11
11
  */
12
12
  export default function ElementApiMixin(base) {
13
13
  class Mixin extends base {
14
+ sourceElement;
14
15
  updateSourceElement(data) {
15
16
  if (!this.sourceElement) {
16
17
  /**