@ckeditor/ckeditor5-core 0.0.0-internal-20241017.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.
Files changed (417) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +24 -0
  4. package/dist/accessibility.d.ts +365 -0
  5. package/dist/augmentation.d.ts +14 -0
  6. package/dist/command.d.ts +193 -0
  7. package/dist/commandcollection.d.ts +87 -0
  8. package/dist/context.d.ts +241 -0
  9. package/dist/contextplugin.d.ts +73 -0
  10. package/dist/editingkeystrokehandler.d.ts +60 -0
  11. package/dist/editor/editor.d.ts +524 -0
  12. package/dist/editor/editorconfig.d.ts +992 -0
  13. package/dist/editor/utils/attachtoform.d.ts +19 -0
  14. package/dist/editor/utils/dataapimixin.d.ts +83 -0
  15. package/dist/editor/utils/editorusagedata.d.ts +62 -0
  16. package/dist/editor/utils/elementapimixin.d.ts +39 -0
  17. package/dist/editor/utils/securesourceelement.d.ts +21 -0
  18. package/dist/index-content.css +4 -0
  19. package/dist/index-editor.css +4 -0
  20. package/dist/index.css +4 -0
  21. package/dist/index.d.ts +94 -0
  22. package/dist/index.js +3027 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/multicommand.d.ts +70 -0
  25. package/dist/pendingactions.d.ts +126 -0
  26. package/dist/plugin.d.ts +294 -0
  27. package/dist/plugincollection.d.ts +121 -0
  28. package/dist/translations/af.d.ts +8 -0
  29. package/dist/translations/af.js +5 -0
  30. package/dist/translations/af.umd.js +11 -0
  31. package/dist/translations/ar.d.ts +8 -0
  32. package/dist/translations/ar.js +5 -0
  33. package/dist/translations/ar.umd.js +11 -0
  34. package/dist/translations/ast.d.ts +8 -0
  35. package/dist/translations/ast.js +5 -0
  36. package/dist/translations/ast.umd.js +11 -0
  37. package/dist/translations/az.d.ts +8 -0
  38. package/dist/translations/az.js +5 -0
  39. package/dist/translations/az.umd.js +11 -0
  40. package/dist/translations/bg.d.ts +8 -0
  41. package/dist/translations/bg.js +5 -0
  42. package/dist/translations/bg.umd.js +11 -0
  43. package/dist/translations/bn.d.ts +8 -0
  44. package/dist/translations/bn.js +5 -0
  45. package/dist/translations/bn.umd.js +11 -0
  46. package/dist/translations/bs.d.ts +8 -0
  47. package/dist/translations/bs.js +5 -0
  48. package/dist/translations/bs.umd.js +11 -0
  49. package/dist/translations/ca.d.ts +8 -0
  50. package/dist/translations/ca.js +5 -0
  51. package/dist/translations/ca.umd.js +11 -0
  52. package/dist/translations/cs.d.ts +8 -0
  53. package/dist/translations/cs.js +5 -0
  54. package/dist/translations/cs.umd.js +11 -0
  55. package/dist/translations/da.d.ts +8 -0
  56. package/dist/translations/da.js +5 -0
  57. package/dist/translations/da.umd.js +11 -0
  58. package/dist/translations/de-ch.d.ts +8 -0
  59. package/dist/translations/de-ch.js +5 -0
  60. package/dist/translations/de-ch.umd.js +11 -0
  61. package/dist/translations/de.d.ts +8 -0
  62. package/dist/translations/de.js +5 -0
  63. package/dist/translations/de.umd.js +11 -0
  64. package/dist/translations/el.d.ts +8 -0
  65. package/dist/translations/el.js +5 -0
  66. package/dist/translations/el.umd.js +11 -0
  67. package/dist/translations/en-au.d.ts +8 -0
  68. package/dist/translations/en-au.js +5 -0
  69. package/dist/translations/en-au.umd.js +11 -0
  70. package/dist/translations/en-gb.d.ts +8 -0
  71. package/dist/translations/en-gb.js +5 -0
  72. package/dist/translations/en-gb.umd.js +11 -0
  73. package/dist/translations/en.d.ts +8 -0
  74. package/dist/translations/en.js +5 -0
  75. package/dist/translations/en.umd.js +11 -0
  76. package/dist/translations/eo.d.ts +8 -0
  77. package/dist/translations/eo.js +5 -0
  78. package/dist/translations/eo.umd.js +11 -0
  79. package/dist/translations/es-co.d.ts +8 -0
  80. package/dist/translations/es-co.js +5 -0
  81. package/dist/translations/es-co.umd.js +11 -0
  82. package/dist/translations/es.d.ts +8 -0
  83. package/dist/translations/es.js +5 -0
  84. package/dist/translations/es.umd.js +11 -0
  85. package/dist/translations/et.d.ts +8 -0
  86. package/dist/translations/et.js +5 -0
  87. package/dist/translations/et.umd.js +11 -0
  88. package/dist/translations/eu.d.ts +8 -0
  89. package/dist/translations/eu.js +5 -0
  90. package/dist/translations/eu.umd.js +11 -0
  91. package/dist/translations/fa.d.ts +8 -0
  92. package/dist/translations/fa.js +5 -0
  93. package/dist/translations/fa.umd.js +11 -0
  94. package/dist/translations/fi.d.ts +8 -0
  95. package/dist/translations/fi.js +5 -0
  96. package/dist/translations/fi.umd.js +11 -0
  97. package/dist/translations/fr.d.ts +8 -0
  98. package/dist/translations/fr.js +5 -0
  99. package/dist/translations/fr.umd.js +11 -0
  100. package/dist/translations/gl.d.ts +8 -0
  101. package/dist/translations/gl.js +5 -0
  102. package/dist/translations/gl.umd.js +11 -0
  103. package/dist/translations/gu.d.ts +8 -0
  104. package/dist/translations/gu.js +5 -0
  105. package/dist/translations/gu.umd.js +11 -0
  106. package/dist/translations/he.d.ts +8 -0
  107. package/dist/translations/he.js +5 -0
  108. package/dist/translations/he.umd.js +11 -0
  109. package/dist/translations/hi.d.ts +8 -0
  110. package/dist/translations/hi.js +5 -0
  111. package/dist/translations/hi.umd.js +11 -0
  112. package/dist/translations/hr.d.ts +8 -0
  113. package/dist/translations/hr.js +5 -0
  114. package/dist/translations/hr.umd.js +11 -0
  115. package/dist/translations/hu.d.ts +8 -0
  116. package/dist/translations/hu.js +5 -0
  117. package/dist/translations/hu.umd.js +11 -0
  118. package/dist/translations/hy.d.ts +8 -0
  119. package/dist/translations/hy.js +5 -0
  120. package/dist/translations/hy.umd.js +11 -0
  121. package/dist/translations/id.d.ts +8 -0
  122. package/dist/translations/id.js +5 -0
  123. package/dist/translations/id.umd.js +11 -0
  124. package/dist/translations/it.d.ts +8 -0
  125. package/dist/translations/it.js +5 -0
  126. package/dist/translations/it.umd.js +11 -0
  127. package/dist/translations/ja.d.ts +8 -0
  128. package/dist/translations/ja.js +5 -0
  129. package/dist/translations/ja.umd.js +11 -0
  130. package/dist/translations/jv.d.ts +8 -0
  131. package/dist/translations/jv.js +5 -0
  132. package/dist/translations/jv.umd.js +11 -0
  133. package/dist/translations/km.d.ts +8 -0
  134. package/dist/translations/km.js +5 -0
  135. package/dist/translations/km.umd.js +11 -0
  136. package/dist/translations/kn.d.ts +8 -0
  137. package/dist/translations/kn.js +5 -0
  138. package/dist/translations/kn.umd.js +11 -0
  139. package/dist/translations/ko.d.ts +8 -0
  140. package/dist/translations/ko.js +5 -0
  141. package/dist/translations/ko.umd.js +11 -0
  142. package/dist/translations/ku.d.ts +8 -0
  143. package/dist/translations/ku.js +5 -0
  144. package/dist/translations/ku.umd.js +11 -0
  145. package/dist/translations/lt.d.ts +8 -0
  146. package/dist/translations/lt.js +5 -0
  147. package/dist/translations/lt.umd.js +11 -0
  148. package/dist/translations/lv.d.ts +8 -0
  149. package/dist/translations/lv.js +5 -0
  150. package/dist/translations/lv.umd.js +11 -0
  151. package/dist/translations/ms.d.ts +8 -0
  152. package/dist/translations/ms.js +5 -0
  153. package/dist/translations/ms.umd.js +11 -0
  154. package/dist/translations/nb.d.ts +8 -0
  155. package/dist/translations/nb.js +5 -0
  156. package/dist/translations/nb.umd.js +11 -0
  157. package/dist/translations/ne.d.ts +8 -0
  158. package/dist/translations/ne.js +5 -0
  159. package/dist/translations/ne.umd.js +11 -0
  160. package/dist/translations/nl.d.ts +8 -0
  161. package/dist/translations/nl.js +5 -0
  162. package/dist/translations/nl.umd.js +11 -0
  163. package/dist/translations/no.d.ts +8 -0
  164. package/dist/translations/no.js +5 -0
  165. package/dist/translations/no.umd.js +11 -0
  166. package/dist/translations/oc.d.ts +8 -0
  167. package/dist/translations/oc.js +5 -0
  168. package/dist/translations/oc.umd.js +11 -0
  169. package/dist/translations/pl.d.ts +8 -0
  170. package/dist/translations/pl.js +5 -0
  171. package/dist/translations/pl.umd.js +11 -0
  172. package/dist/translations/pt-br.d.ts +8 -0
  173. package/dist/translations/pt-br.js +5 -0
  174. package/dist/translations/pt-br.umd.js +11 -0
  175. package/dist/translations/pt.d.ts +8 -0
  176. package/dist/translations/pt.js +5 -0
  177. package/dist/translations/pt.umd.js +11 -0
  178. package/dist/translations/ro.d.ts +8 -0
  179. package/dist/translations/ro.js +5 -0
  180. package/dist/translations/ro.umd.js +11 -0
  181. package/dist/translations/ru.d.ts +8 -0
  182. package/dist/translations/ru.js +5 -0
  183. package/dist/translations/ru.umd.js +11 -0
  184. package/dist/translations/si.d.ts +8 -0
  185. package/dist/translations/si.js +5 -0
  186. package/dist/translations/si.umd.js +11 -0
  187. package/dist/translations/sk.d.ts +8 -0
  188. package/dist/translations/sk.js +5 -0
  189. package/dist/translations/sk.umd.js +11 -0
  190. package/dist/translations/sl.d.ts +8 -0
  191. package/dist/translations/sl.js +5 -0
  192. package/dist/translations/sl.umd.js +11 -0
  193. package/dist/translations/sq.d.ts +8 -0
  194. package/dist/translations/sq.js +5 -0
  195. package/dist/translations/sq.umd.js +11 -0
  196. package/dist/translations/sr-latn.d.ts +8 -0
  197. package/dist/translations/sr-latn.js +5 -0
  198. package/dist/translations/sr-latn.umd.js +11 -0
  199. package/dist/translations/sr.d.ts +8 -0
  200. package/dist/translations/sr.js +5 -0
  201. package/dist/translations/sr.umd.js +11 -0
  202. package/dist/translations/sv.d.ts +8 -0
  203. package/dist/translations/sv.js +5 -0
  204. package/dist/translations/sv.umd.js +11 -0
  205. package/dist/translations/th.d.ts +8 -0
  206. package/dist/translations/th.js +5 -0
  207. package/dist/translations/th.umd.js +11 -0
  208. package/dist/translations/ti.d.ts +8 -0
  209. package/dist/translations/ti.js +5 -0
  210. package/dist/translations/ti.umd.js +11 -0
  211. package/dist/translations/tk.d.ts +8 -0
  212. package/dist/translations/tk.js +5 -0
  213. package/dist/translations/tk.umd.js +11 -0
  214. package/dist/translations/tr.d.ts +8 -0
  215. package/dist/translations/tr.js +5 -0
  216. package/dist/translations/tr.umd.js +11 -0
  217. package/dist/translations/tt.d.ts +8 -0
  218. package/dist/translations/tt.js +5 -0
  219. package/dist/translations/tt.umd.js +11 -0
  220. package/dist/translations/ug.d.ts +8 -0
  221. package/dist/translations/ug.js +5 -0
  222. package/dist/translations/ug.umd.js +11 -0
  223. package/dist/translations/uk.d.ts +8 -0
  224. package/dist/translations/uk.js +5 -0
  225. package/dist/translations/uk.umd.js +11 -0
  226. package/dist/translations/ur.d.ts +8 -0
  227. package/dist/translations/ur.js +5 -0
  228. package/dist/translations/ur.umd.js +11 -0
  229. package/dist/translations/uz.d.ts +8 -0
  230. package/dist/translations/uz.js +5 -0
  231. package/dist/translations/uz.umd.js +11 -0
  232. package/dist/translations/vi.d.ts +8 -0
  233. package/dist/translations/vi.js +5 -0
  234. package/dist/translations/vi.umd.js +11 -0
  235. package/dist/translations/zh-cn.d.ts +8 -0
  236. package/dist/translations/zh-cn.js +5 -0
  237. package/dist/translations/zh-cn.umd.js +11 -0
  238. package/dist/translations/zh.d.ts +8 -0
  239. package/dist/translations/zh.js +5 -0
  240. package/dist/translations/zh.umd.js +11 -0
  241. package/dist/typings.d.ts +16 -0
  242. package/lang/contexts.json +31 -0
  243. package/lang/translations/af.po +134 -0
  244. package/lang/translations/ar.po +134 -0
  245. package/lang/translations/ast.po +134 -0
  246. package/lang/translations/az.po +134 -0
  247. package/lang/translations/bg.po +134 -0
  248. package/lang/translations/bn.po +134 -0
  249. package/lang/translations/bs.po +134 -0
  250. package/lang/translations/ca.po +134 -0
  251. package/lang/translations/cs.po +134 -0
  252. package/lang/translations/da.po +134 -0
  253. package/lang/translations/de-ch.po +134 -0
  254. package/lang/translations/de.po +134 -0
  255. package/lang/translations/el.po +134 -0
  256. package/lang/translations/en-au.po +134 -0
  257. package/lang/translations/en-gb.po +134 -0
  258. package/lang/translations/en.po +134 -0
  259. package/lang/translations/eo.po +134 -0
  260. package/lang/translations/es-co.po +134 -0
  261. package/lang/translations/es.po +134 -0
  262. package/lang/translations/et.po +134 -0
  263. package/lang/translations/eu.po +134 -0
  264. package/lang/translations/fa.po +134 -0
  265. package/lang/translations/fi.po +134 -0
  266. package/lang/translations/fr.po +134 -0
  267. package/lang/translations/gl.po +134 -0
  268. package/lang/translations/gu.po +134 -0
  269. package/lang/translations/he.po +134 -0
  270. package/lang/translations/hi.po +134 -0
  271. package/lang/translations/hr.po +134 -0
  272. package/lang/translations/hu.po +134 -0
  273. package/lang/translations/hy.po +134 -0
  274. package/lang/translations/id.po +134 -0
  275. package/lang/translations/it.po +134 -0
  276. package/lang/translations/ja.po +134 -0
  277. package/lang/translations/jv.po +134 -0
  278. package/lang/translations/km.po +134 -0
  279. package/lang/translations/kn.po +134 -0
  280. package/lang/translations/ko.po +134 -0
  281. package/lang/translations/ku.po +134 -0
  282. package/lang/translations/lt.po +134 -0
  283. package/lang/translations/lv.po +134 -0
  284. package/lang/translations/ms.po +134 -0
  285. package/lang/translations/nb.po +134 -0
  286. package/lang/translations/ne.po +134 -0
  287. package/lang/translations/nl.po +134 -0
  288. package/lang/translations/no.po +134 -0
  289. package/lang/translations/oc.po +134 -0
  290. package/lang/translations/pl.po +134 -0
  291. package/lang/translations/pt-br.po +134 -0
  292. package/lang/translations/pt.po +134 -0
  293. package/lang/translations/ro.po +134 -0
  294. package/lang/translations/ru.po +134 -0
  295. package/lang/translations/si.po +134 -0
  296. package/lang/translations/sk.po +134 -0
  297. package/lang/translations/sl.po +134 -0
  298. package/lang/translations/sq.po +134 -0
  299. package/lang/translations/sr-latn.po +134 -0
  300. package/lang/translations/sr.po +134 -0
  301. package/lang/translations/sv.po +134 -0
  302. package/lang/translations/th.po +134 -0
  303. package/lang/translations/ti.po +134 -0
  304. package/lang/translations/tk.po +134 -0
  305. package/lang/translations/tr.po +134 -0
  306. package/lang/translations/tt.po +134 -0
  307. package/lang/translations/ug.po +134 -0
  308. package/lang/translations/uk.po +134 -0
  309. package/lang/translations/ur.po +134 -0
  310. package/lang/translations/uz.po +134 -0
  311. package/lang/translations/vi.po +134 -0
  312. package/lang/translations/zh-cn.po +134 -0
  313. package/lang/translations/zh.po +134 -0
  314. package/package.json +51 -0
  315. package/src/accessibility.d.ts +361 -0
  316. package/src/accessibility.js +325 -0
  317. package/src/augmentation.d.ts +10 -0
  318. package/src/augmentation.js +5 -0
  319. package/src/command.d.ts +189 -0
  320. package/src/command.js +185 -0
  321. package/src/commandcollection.d.ts +83 -0
  322. package/src/commandcollection.js +83 -0
  323. package/src/context.d.ts +237 -0
  324. package/src/context.js +229 -0
  325. package/src/contextplugin.d.ts +69 -0
  326. package/src/contextplugin.js +55 -0
  327. package/src/editingkeystrokehandler.d.ts +56 -0
  328. package/src/editingkeystrokehandler.js +57 -0
  329. package/src/editor/editor.d.ts +520 -0
  330. package/src/editor/editor.js +701 -0
  331. package/src/editor/editorconfig.d.ts +988 -0
  332. package/src/editor/editorconfig.js +5 -0
  333. package/src/editor/utils/attachtoform.d.ts +15 -0
  334. package/src/editor/utils/attachtoform.js +57 -0
  335. package/src/editor/utils/dataapimixin.d.ts +79 -0
  336. package/src/editor/utils/dataapimixin.js +12 -0
  337. package/src/editor/utils/editorusagedata.d.ts +58 -0
  338. package/src/editor/utils/editorusagedata.js +120 -0
  339. package/src/editor/utils/elementapimixin.d.ts +35 -0
  340. package/src/editor/utils/elementapimixin.js +43 -0
  341. package/src/editor/utils/securesourceelement.d.ts +17 -0
  342. package/src/editor/utils/securesourceelement.js +35 -0
  343. package/src/index.d.ts +90 -0
  344. package/src/index.js +147 -0
  345. package/src/multicommand.d.ts +66 -0
  346. package/src/multicommand.js +82 -0
  347. package/src/pendingactions.d.ts +122 -0
  348. package/src/pendingactions.js +123 -0
  349. package/src/plugin.d.ts +290 -0
  350. package/src/plugin.js +118 -0
  351. package/src/plugincollection.d.ts +117 -0
  352. package/src/plugincollection.js +473 -0
  353. package/src/typings.d.ts +12 -0
  354. package/src/typings.js +5 -0
  355. package/theme/icons/align-bottom.svg +1 -0
  356. package/theme/icons/align-center.svg +1 -0
  357. package/theme/icons/align-justify.svg +1 -0
  358. package/theme/icons/align-left.svg +1 -0
  359. package/theme/icons/align-middle.svg +1 -0
  360. package/theme/icons/align-right.svg +1 -0
  361. package/theme/icons/align-top.svg +1 -0
  362. package/theme/icons/bold.svg +1 -0
  363. package/theme/icons/browse-files.svg +1 -0
  364. package/theme/icons/bulletedlist.svg +1 -0
  365. package/theme/icons/cancel.svg +1 -0
  366. package/theme/icons/caption.svg +1 -0
  367. package/theme/icons/check.svg +1 -0
  368. package/theme/icons/codeblock.svg +1 -0
  369. package/theme/icons/cog.svg +1 -0
  370. package/theme/icons/color-palette.svg +1 -0
  371. package/theme/icons/drag-indicator.svg +1 -0
  372. package/theme/icons/eraser.svg +1 -0
  373. package/theme/icons/heading1.svg +1 -0
  374. package/theme/icons/heading2.svg +1 -0
  375. package/theme/icons/heading3.svg +1 -0
  376. package/theme/icons/heading4.svg +1 -0
  377. package/theme/icons/heading5.svg +1 -0
  378. package/theme/icons/heading6.svg +1 -0
  379. package/theme/icons/history.svg +1 -0
  380. package/theme/icons/horizontalline.svg +1 -0
  381. package/theme/icons/html.svg +1 -0
  382. package/theme/icons/image-asset-manager.svg +1 -0
  383. package/theme/icons/image-upload.svg +1 -0
  384. package/theme/icons/image-url.svg +1 -0
  385. package/theme/icons/image.svg +1 -0
  386. package/theme/icons/importexport.svg +1 -0
  387. package/theme/icons/indent.svg +1 -0
  388. package/theme/icons/loupe.svg +1 -0
  389. package/theme/icons/low-vision.svg +1 -0
  390. package/theme/icons/next-arrow.svg +1 -0
  391. package/theme/icons/numberedlist.svg +1 -0
  392. package/theme/icons/object-center.svg +1 -0
  393. package/theme/icons/object-full-width.svg +1 -0
  394. package/theme/icons/object-inline-left.svg +1 -0
  395. package/theme/icons/object-inline-right.svg +1 -0
  396. package/theme/icons/object-inline.svg +1 -0
  397. package/theme/icons/object-left.svg +1 -0
  398. package/theme/icons/object-right.svg +1 -0
  399. package/theme/icons/object-size-custom.svg +1 -0
  400. package/theme/icons/object-size-full.svg +1 -0
  401. package/theme/icons/object-size-large.svg +1 -0
  402. package/theme/icons/object-size-medium.svg +1 -0
  403. package/theme/icons/object-size-small.svg +1 -0
  404. package/theme/icons/outdent.svg +1 -0
  405. package/theme/icons/paragraph.svg +1 -0
  406. package/theme/icons/pencil.svg +1 -0
  407. package/theme/icons/pilcrow.svg +1 -0
  408. package/theme/icons/plus.svg +1 -0
  409. package/theme/icons/previous-arrow.svg +1 -0
  410. package/theme/icons/quote.svg +1 -0
  411. package/theme/icons/redo.svg +1 -0
  412. package/theme/icons/table.svg +1 -0
  413. package/theme/icons/text-alternative.svg +1 -0
  414. package/theme/icons/text.svg +1 -0
  415. package/theme/icons/three-vertical-dots.svg +1 -0
  416. package/theme/icons/todolist.svg +1 -0
  417. package/theme/icons/undo.svg +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ Changelog
2
+ =========
3
+
4
+ All changes in the package are documented in https://github.com/ckeditor/ckeditor5/blob/master/CHANGELOG.md.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ Software License Agreement
2
+ ==========================
3
+
4
+ **CKEditor&nbsp;5 core editor architecture** – https://github.com/ckeditor/ckeditor5-core <br>
5
+ Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
6
+
7
+ Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
8
+
9
+ Sources of Intellectual Property Included in CKEditor
10
+ -----------------------------------------------------
11
+
12
+ Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
13
+
14
+ The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):
15
+
16
+ * Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
17
+
18
+ Trademarks
19
+ ----------
20
+
21
+ **CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ CKEditor&nbsp;5 core editor architecture
2
+ ========================================
3
+
4
+ [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-core.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-core)
5
+ [![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
6
+ [![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5)
7
+
8
+ This package implements CKEditor&nbsp;5's core editor architecture &ndash; a set of classes and interfaces which glue everything together.
9
+
10
+ ## Documentation
11
+
12
+ For general introduction see the [Overview of CKEditor&nbsp;5 framework](https://ckeditor.com/docs/ckeditor5/latest/framework/index.html) guide and then the [core editor architecture guide](https://ckeditor.com/docs/ckeditor5/latest/framework/architecture/core-editor-architecture.html).
13
+
14
+ Additionally, see the [`@ckeditor/ckeditor5-core` package](https://ckeditor.com/docs/ckeditor5/latest/api/core.html) page in [CKEditor&nbsp;5 documentation](https://ckeditor.com/docs/ckeditor5/latest/) for even more information.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install ckeditor5
20
+ ```
21
+
22
+ ## License
23
+
24
+ Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
@@ -0,0 +1,365 @@
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
+ import type Editor from './editor/editor.js';
10
+ export declare const DEFAULT_GROUP_ID: "common";
11
+ /**
12
+ * A common namespace for various accessibility features of the editor.
13
+ *
14
+ * **Information about editor keystrokes**
15
+ *
16
+ * * The information about keystrokes available in the editor is stored in the {@link #keystrokeInfos} property.
17
+ * * New info entries can be added using the {@link #addKeystrokeInfoCategory}, {@link #addKeystrokeInfoGroup},
18
+ * and {@link #addKeystrokeInfos} methods.
19
+ */
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
+ readonly keystrokeInfos: KeystrokeInfos;
39
+ /**
40
+ * The editor instance.
41
+ */
42
+ private readonly _editor;
43
+ /**
44
+ * @inheritDoc
45
+ */
46
+ constructor(editor: Editor);
47
+ /**
48
+ * Adds a top-level category in the {@link #keystrokeInfos keystroke information database} with a label and optional description.
49
+ *
50
+ * Categories organize keystrokes and help users to find the right keystroke. Each category can have multiple groups
51
+ * of keystrokes that narrow down the context in which the keystrokes are available. Every keystroke category comes
52
+ * with a `'common'` group by default.
53
+ *
54
+ * By default, two categories are available:
55
+ * * `'contentEditing'` for keystrokes related to content creation,
56
+ * * `'navigation'` for keystrokes related to navigation in the UI and the content.
57
+ *
58
+ * To create a new keystroke category with new groups, use the following code:
59
+ *
60
+ * ```js
61
+ * class MyPlugin extends Plugin {
62
+ * // ...
63
+ * init() {
64
+ * const editor = this.editor;
65
+ * const t = editor.t;
66
+ *
67
+ * // ...
68
+ *
69
+ * editor.accessibility.addKeystrokeInfoCategory( {
70
+ * id: 'myCategory',
71
+ * label: t( 'My category' ),
72
+ * description: t( 'My category description.' ),
73
+ * groups: [
74
+ * {
75
+ * id: 'myGroup',
76
+ * label: t( 'My keystroke group' ),
77
+ * keystrokes: [
78
+ * {
79
+ * label: t( 'Keystroke label 1' ),
80
+ * keystroke: 'Ctrl+Shift+N'
81
+ * },
82
+ * {
83
+ * label: t( 'Keystroke label 2' ),
84
+ * keystroke: 'Ctrl+Shift+M'
85
+ * }
86
+ * ]
87
+ * }
88
+ * ]
89
+ * };
90
+ * }
91
+ * }
92
+ * ```
93
+ *
94
+ * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfos}.
95
+ */
96
+ addKeystrokeInfoCategory({ id, label, description, groups }: AddKeystrokeInfoCategoryData): void;
97
+ /**
98
+ * Adds a group of keystrokes in a specific category to the {@link #keystrokeInfos keystroke information database}.
99
+ *
100
+ * Groups narrow down the context in which the keystrokes are available. When `categoryId` is not specified,
101
+ * the group goes to the `'contentEditing'` category (default).
102
+ *
103
+ * To create a new group within an existing category, use the following code:
104
+ *
105
+ * ```js
106
+ * class MyPlugin extends Plugin {
107
+ * // ...
108
+ * init() {
109
+ * const editor = this.editor;
110
+ * const t = editor.t;
111
+ *
112
+ * // ...
113
+ *
114
+ * editor.accessibility.addKeystrokeInfoGroup( {
115
+ * id: 'myGroup',
116
+ * categoryId: 'navigation',
117
+ * label: t( 'My keystroke group' ),
118
+ * keystrokes: [
119
+ * {
120
+ * label: t( 'Keystroke label 1' ),
121
+ * keystroke: 'Ctrl+Shift+N'
122
+ * },
123
+ * {
124
+ * label: t( 'Keystroke label 2' ),
125
+ * keystroke: 'Ctrl+Shift+M'
126
+ * }
127
+ * ]
128
+ * } );
129
+ * }
130
+ * }
131
+ * ```
132
+ *
133
+ * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoCategory}, and {@link #addKeystrokeInfos}.
134
+ */
135
+ addKeystrokeInfoGroup({ categoryId, id, label, keystrokes }: AddKeystrokeInfoGroupData): void;
136
+ /**
137
+ * Adds information about keystrokes to the {@link #keystrokeInfos keystroke information database}.
138
+ *
139
+ * Keystrokes without specified `groupId` or `categoryId` go to the `'common'` group in the `'contentEditing'` category (default).
140
+ *
141
+ * To add a keystroke brought by your plugin (using default group and category), use the following code:
142
+ *
143
+ * ```js
144
+ * class MyPlugin extends Plugin {
145
+ * // ...
146
+ * init() {
147
+ * const editor = this.editor;
148
+ * const t = editor.t;
149
+ *
150
+ * // ...
151
+ *
152
+ * editor.accessibility.addKeystrokeInfos( {
153
+ * keystrokes: [
154
+ * {
155
+ * label: t( 'Keystroke label' ),
156
+ * keystroke: 'CTRL+B'
157
+ * }
158
+ * ]
159
+ * } );
160
+ * }
161
+ * }
162
+ * ```
163
+ * To add a keystroke in a specific existing `'widget'` group in the default `'contentEditing'` category:
164
+ *
165
+ * ```js
166
+ * class MyPlugin extends Plugin {
167
+ * // ...
168
+ * init() {
169
+ * const editor = this.editor;
170
+ * const t = editor.t;
171
+ *
172
+ * // ...
173
+ *
174
+ * editor.accessibility.addKeystrokeInfos( {
175
+ * // Add a keystroke to the existing "widget" group.
176
+ * groupId: 'widget',
177
+ * keystrokes: [
178
+ * {
179
+ * label: t( 'A an action on a selected widget' ),
180
+ * keystroke: 'Ctrl+D',
181
+ * }
182
+ * ]
183
+ * } );
184
+ * }
185
+ * }
186
+ * ```
187
+ *
188
+ * To add a keystroke to another existing category (using default group):
189
+ *
190
+ * ```js
191
+ * class MyPlugin extends Plugin {
192
+ * // ...
193
+ * init() {
194
+ * const editor = this.editor;
195
+ * const t = editor.t;
196
+ *
197
+ * // ...
198
+ *
199
+ * editor.accessibility.addKeystrokeInfos( {
200
+ * // Add keystrokes to the "navigation" category (one of defaults).
201
+ * categoryId: 'navigation',
202
+ * keystrokes: [
203
+ * {
204
+ * label: t( 'Keystroke label' ),
205
+ * keystroke: 'CTRL+B'
206
+ * }
207
+ * ]
208
+ * } );
209
+ * }
210
+ * }
211
+ * ```
212
+ *
213
+ * See {@link #keystrokeInfos}, {@link #addKeystrokeInfoGroup}, and {@link #addKeystrokeInfoCategory}.
214
+ */
215
+ addKeystrokeInfos({ categoryId, groupId, keystrokes }: AddKeystrokeInfosData): void;
216
+ }
217
+ /**
218
+ * A description of category of keystrokes accepted by the {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory} method.
219
+ *
220
+ * Top-level categories organize keystrokes and help users to find the right keystroke. Each category can have multiple groups of
221
+ * keystrokes that narrow down the context in which the keystrokes are available.
222
+ *
223
+ * See {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup} and
224
+ * {@link module:core/accessibility~Accessibility#addKeystrokeInfos}.
225
+ */
226
+ export interface AddKeystrokeInfoCategoryData {
227
+ /**
228
+ * The unique id of the category.
229
+ */
230
+ id: string;
231
+ /**
232
+ * The label of the category.
233
+ */
234
+ label: string;
235
+ /**
236
+ * The description of the category (optional).
237
+ */
238
+ description?: string;
239
+ /**
240
+ * Groups of keystrokes within the category.
241
+ */
242
+ groups?: Array<AddKeystrokeInfoGroupData>;
243
+ }
244
+ /**
245
+ * A description of keystroke group accepted by the {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup} method.
246
+ *
247
+ * Groups narrow down the context in which the keystrokes are available. When `categoryId` is not specified, the group goes
248
+ * to the `'contentEditing'` category (default).
249
+ *
250
+ * See {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory} and
251
+ * {@link module:core/accessibility~Accessibility#addKeystrokeInfos}.
252
+ */
253
+ export interface AddKeystrokeInfoGroupData {
254
+ /**
255
+ * The category id the group belongs to.
256
+ */
257
+ categoryId?: string;
258
+ /**
259
+ * The unique id of the group.
260
+ */
261
+ id: string;
262
+ /**
263
+ * The label of the group (optional).
264
+ */
265
+ label?: string;
266
+ /**
267
+ * Keystroke definitions within the group.
268
+ */
269
+ keystrokes?: Array<KeystrokeInfoDefinition>;
270
+ }
271
+ /**
272
+ * Description of keystrokes accepted by the {@link module:core/accessibility~Accessibility#addKeystrokeInfos} method.
273
+ *
274
+ * Keystrokes without specified `groupId` or `categoryId` go to the `'common'` group in the `'contentEditing'` category (default).
275
+ *
276
+ * See {@link module:core/accessibility~Accessibility#addKeystrokeInfoCategory} and
277
+ * {@link module:core/accessibility~Accessibility#addKeystrokeInfoGroup}.
278
+ */
279
+ export interface AddKeystrokeInfosData {
280
+ /**
281
+ * The category id the keystrokes belong to.
282
+ */
283
+ categoryId?: string;
284
+ /**
285
+ * The group id the keystrokes belong to.
286
+ */
287
+ groupId?: string;
288
+ /**
289
+ * An array of keystroke definitions.
290
+ */
291
+ keystrokes: Array<KeystrokeInfoDefinition>;
292
+ }
293
+ export type KeystrokeInfos = Map<string, KeystrokeInfoCategory>;
294
+ /**
295
+ * A category of keystrokes in {@link module:core/accessibility~Accessibility#keystrokeInfos}.
296
+ */
297
+ export type KeystrokeInfoCategory = {
298
+ /**
299
+ * The unique id of the category.
300
+ */
301
+ id: string;
302
+ /**
303
+ * The label of the category.
304
+ */
305
+ label: string;
306
+ /**
307
+ * The description of the category (optional).
308
+ */
309
+ description?: string;
310
+ /**
311
+ * Groups of keystrokes within the category.
312
+ */
313
+ groups: Map<string, KeystrokeInfoGroup>;
314
+ };
315
+ /**
316
+ * A group of keystrokes in {@link module:core/accessibility~Accessibility#keystrokeInfos}.
317
+ */
318
+ export type KeystrokeInfoGroup = {
319
+ /**
320
+ * The unique id of the group.
321
+ */
322
+ id: string;
323
+ /**
324
+ * The label of the group (optional).
325
+ */
326
+ label?: string;
327
+ /**
328
+ * Keystroke definitions within the group.
329
+ */
330
+ keystrokes: Array<KeystrokeInfoDefinition>;
331
+ };
332
+ /**
333
+ * A keystroke info definition in {@link module:core/accessibility~Accessibility#keystrokeInfos}
334
+ */
335
+ export interface KeystrokeInfoDefinition {
336
+ /**
337
+ * The label of the keystroke. It should briefly describe the action that the keystroke performs. It may contain HTML.
338
+ */
339
+ label: string;
340
+ /**
341
+ * The keystroke string. In its basic form, it must be a combination of {@link module:utils/keyboard#keyCodes known key names}
342
+ * joined by the `+` sign, the same as the keystroke format accepted by the
343
+ * {@link module:utils/keystrokehandler~KeystrokeHandler#set `KeystrokeHandler#set()`} method used to register most of the
344
+ * keystroke interactions in the editor.
345
+ *
346
+ * * The keystroke string can represent a single keystroke, for instance: `keystroke: 'Ctrl+B'`, `keystroke: 'Shift+Enter'`,
347
+ * `keystroke: 'Alt+F10'`, etc.
348
+ * * The keystroke can be activated by successive press of multiple keys. For instance `keystroke: [ [ 'arrowleft', 'arrowleft' ] ]`
349
+ * will indicate that a specific action will be performed by pressing <kbd>←</kbd> twice in a row.
350
+ * * Keystrokes can have alternatives. For instance `keystroke: [ [ 'Ctrl+Y' ], [ 'Ctrl+Shift+Z' ] ]` will indicate that
351
+ * a specific action can be performed by pressing either <kbd>Ctrl</kbd> + <kbd>Y</kbd> or
352
+ * <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Z</kbd>.
353
+ *
354
+ * Please note that the keystrokes are automatically translated to the environment-specific form. For example, `Ctrl+A`
355
+ * will be rendered as `⌘A` in the {@link module:utils/env~EnvType#isMac Mac environment}. Always use the IBM PC keyboard
356
+ * syntax, for instance `Ctrl` instead of `⌘`, `Alt` instead of `⌥`, etc.
357
+ */
358
+ keystroke: string | Array<string> | Array<Array<string>>;
359
+ /**
360
+ * This (optional) flag suggests that the keystroke(s) may require a function (<kbd>Fn</kbd>) key to be pressed
361
+ * in order to work in the {@link module:utils/env~EnvType#isMac Mac environment}. If set `true`, an additional
362
+ * information will be displayed next to the keystroke.
363
+ */
364
+ mayRequireFn?: boolean;
365
+ }
@@ -0,0 +1,14 @@
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
+ import type { PendingActions } from './index.js';
10
+ declare module '@ckeditor/ckeditor5-core' {
11
+ interface PluginsMap {
12
+ [PendingActions.pluginName]: PendingActions;
13
+ }
14
+ }
@@ -0,0 +1,193 @@
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 core/command
11
+ */
12
+ import { type DecoratedMethodEvent } from '@ckeditor/ckeditor5-utils';
13
+ import type Editor from './editor/editor.js';
14
+ declare const Command_base: {
15
+ new (): import("@ckeditor/ckeditor5-utils").Observable;
16
+ prototype: import("@ckeditor/ckeditor5-utils").Observable;
17
+ };
18
+ /**
19
+ * Base class for the CKEditor commands.
20
+ *
21
+ * Commands are the main way to manipulate the editor contents and state. They are mostly used by UI elements (or by other
22
+ * commands) to make changes in the model. Commands are available in every part of the code that has access to
23
+ * the {@link module:core/editor/editor~Editor editor} instance.
24
+ *
25
+ * Instances of registered commands can be retrieved from {@link module:core/editor/editor~Editor#commands `editor.commands`}.
26
+ * The easiest way to execute a command is through {@link module:core/editor/editor~Editor#execute `editor.execute()`}.
27
+ *
28
+ * By default, commands are disabled when the editor is in the {@link module:core/editor/editor~Editor#isReadOnly read-only} mode
29
+ * but commands with the {@link module:core/command~Command#affectsData `affectsData`} flag set to `false` will not be disabled.
30
+ */
31
+ export default class Command extends /* #__PURE__ */ Command_base {
32
+ /**
33
+ * The editor on which this command will be used.
34
+ */
35
+ readonly editor: Editor;
36
+ /**
37
+ * The value of the command. A given command class should define what it represents for it.
38
+ *
39
+ * For example, the `'bold'` command's value indicates whether the selection starts in a bolded text.
40
+ * And the value of the `'link'` command may be an object with link details.
41
+ *
42
+ * It is possible for a command to have no value (e.g. for stateless actions such as `'uploadImage'`).
43
+ *
44
+ * A given command class should control this value by overriding the {@link #refresh `refresh()`} method.
45
+ *
46
+ * @observable
47
+ * @readonly
48
+ */
49
+ value: unknown;
50
+ /**
51
+ * Flag indicating whether a command is enabled or disabled.
52
+ * A disabled command will do nothing when executed.
53
+ *
54
+ * A given command class should control this value by overriding the {@link #refresh `refresh()`} method.
55
+ *
56
+ * It is possible to disable a command "from outside" using {@link #forceDisabled} method.
57
+ *
58
+ * @observable
59
+ * @readonly
60
+ */
61
+ isEnabled: boolean;
62
+ /**
63
+ * A flag indicating whether a command's `isEnabled` state should be changed depending on where the document
64
+ * selection is placed.
65
+ *
66
+ * By default, it is set to `true`. If the document selection is placed in a
67
+ * {@link module:engine/model/model~Model#canEditAt non-editable} place (such as non-editable root), the command becomes disabled.
68
+ *
69
+ * The flag should be changed to `false` in a concrete command's constructor if the command should not change its `isEnabled`
70
+ * accordingly to the document selection.
71
+ */
72
+ protected _isEnabledBasedOnSelection: boolean;
73
+ /**
74
+ * A flag indicating whether a command execution changes the editor data or not.
75
+ *
76
+ * @see #affectsData
77
+ */
78
+ private _affectsData;
79
+ /**
80
+ * Holds identifiers for {@link #forceDisabled} mechanism.
81
+ */
82
+ private readonly _disableStack;
83
+ /**
84
+ * Creates a new `Command` instance.
85
+ *
86
+ * @param editor The editor on which this command will be used.
87
+ */
88
+ constructor(editor: Editor);
89
+ /**
90
+ * A flag indicating whether a command execution changes the editor data or not.
91
+ *
92
+ * Commands with `affectsData` set to `false` will not be automatically disabled in
93
+ * the {@link module:core/editor/editor~Editor#isReadOnly read-only mode} and
94
+ * {@glink features/read-only#related-features other editor modes} with restricted user write permissions.
95
+ *
96
+ * **Note:** You do not have to set it for your every command. It is `true` by default.
97
+ *
98
+ * @default true
99
+ */
100
+ get affectsData(): boolean;
101
+ protected set affectsData(affectsData: boolean);
102
+ /**
103
+ * Refreshes the command. The command should update its {@link #isEnabled} and {@link #value} properties
104
+ * in this method.
105
+ *
106
+ * This method is automatically called when
107
+ * {@link module:engine/model/document~Document#event:change any changes are applied to the document}.
108
+ */
109
+ refresh(): void;
110
+ /**
111
+ * Disables the command.
112
+ *
113
+ * Command may be disabled by multiple features or algorithms (at once). When disabling a command, unique id should be passed
114
+ * (e.g. the feature name). The same identifier should be used when {@link #clearForceDisabled enabling back} the command.
115
+ * The command becomes enabled only after all features {@link #clearForceDisabled enabled it back}.
116
+ *
117
+ * Disabling and enabling a command:
118
+ *
119
+ * ```ts
120
+ * command.isEnabled; // -> true
121
+ * command.forceDisabled( 'MyFeature' );
122
+ * command.isEnabled; // -> false
123
+ * command.clearForceDisabled( 'MyFeature' );
124
+ * command.isEnabled; // -> true
125
+ * ```
126
+ *
127
+ * Command disabled by multiple features:
128
+ *
129
+ * ```ts
130
+ * command.forceDisabled( 'MyFeature' );
131
+ * command.forceDisabled( 'OtherFeature' );
132
+ * command.clearForceDisabled( 'MyFeature' );
133
+ * command.isEnabled; // -> false
134
+ * command.clearForceDisabled( 'OtherFeature' );
135
+ * command.isEnabled; // -> true
136
+ * ```
137
+ *
138
+ * Multiple disabling with the same identifier is redundant:
139
+ *
140
+ * ```ts
141
+ * command.forceDisabled( 'MyFeature' );
142
+ * command.forceDisabled( 'MyFeature' );
143
+ * command.clearForceDisabled( 'MyFeature' );
144
+ * command.isEnabled; // -> true
145
+ * ```
146
+ *
147
+ * **Note:** some commands or algorithms may have more complex logic when it comes to enabling or disabling certain commands,
148
+ * so the command might be still disabled after {@link #clearForceDisabled} was used.
149
+ *
150
+ * @param id Unique identifier for disabling. Use the same id when {@link #clearForceDisabled enabling back} the command.
151
+ */
152
+ forceDisabled(id: string): void;
153
+ /**
154
+ * Clears forced disable previously set through {@link #forceDisabled}. See {@link #forceDisabled}.
155
+ *
156
+ * @param id Unique identifier, equal to the one passed in {@link #forceDisabled} call.
157
+ */
158
+ clearForceDisabled(id: string): void;
159
+ /**
160
+ * Executes the command.
161
+ *
162
+ * A command may accept parameters. They will be passed from {@link module:core/editor/editor~Editor#execute `editor.execute()`}
163
+ * to the command.
164
+ *
165
+ * The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).
166
+ * This behavior is implemented by a high priority listener to the {@link #event:execute} event.
167
+ *
168
+ * In order to see how to disable a command from "outside" see the {@link #isEnabled} documentation.
169
+ *
170
+ * This method may return a value, which would be forwarded all the way down to the
171
+ * {@link module:core/editor/editor~Editor#execute `editor.execute()`}.
172
+ *
173
+ * @fires execute
174
+ */
175
+ execute(...args: Array<unknown>): unknown;
176
+ /**
177
+ * Destroys the command.
178
+ */
179
+ destroy(): void;
180
+ }
181
+ /**
182
+ * Event fired by the {@link module:core/command~Command#execute} method. The command action is a listener to this event so it's
183
+ * possible to change/cancel the behavior of the command by listening to this event.
184
+ *
185
+ * See {@link module:utils/observablemixin~Observable#decorate} for more information and samples.
186
+ *
187
+ * **Note:** This event is fired even if command is disabled. However, it is automatically blocked
188
+ * by a high priority listener in order to prevent command execution.
189
+ *
190
+ * @eventName ~Command#execute
191
+ */
192
+ export type CommandExecuteEvent = DecoratedMethodEvent<Command, 'execute'>;
193
+ export {};