@ckeditor/ckeditor5-image 41.3.1 → 41.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (424) hide show
  1. package/build/image.js +2 -2
  2. package/build/translations/ar.js +1 -1
  3. package/build/translations/ast.js +1 -1
  4. package/build/translations/az.js +1 -1
  5. package/build/translations/bg.js +1 -1
  6. package/build/translations/bn.js +1 -1
  7. package/build/translations/bs.js +1 -1
  8. package/build/translations/ca.js +1 -1
  9. package/build/translations/cs.js +1 -1
  10. package/build/translations/da.js +1 -1
  11. package/build/translations/de-ch.js +1 -1
  12. package/build/translations/de.js +1 -1
  13. package/build/translations/el.js +1 -1
  14. package/build/translations/en-au.js +1 -1
  15. package/build/translations/en-gb.js +1 -1
  16. package/build/translations/eo.js +1 -1
  17. package/build/translations/es-co.js +1 -1
  18. package/build/translations/es.js +1 -1
  19. package/build/translations/et.js +1 -1
  20. package/build/translations/eu.js +1 -1
  21. package/build/translations/fa.js +1 -1
  22. package/build/translations/fi.js +1 -1
  23. package/build/translations/fr.js +1 -1
  24. package/build/translations/gl.js +1 -1
  25. package/build/translations/he.js +1 -1
  26. package/build/translations/hi.js +1 -1
  27. package/build/translations/hr.js +1 -1
  28. package/build/translations/hu.js +1 -1
  29. package/build/translations/id.js +1 -1
  30. package/build/translations/it.js +1 -1
  31. package/build/translations/ja.js +1 -1
  32. package/build/translations/jv.js +1 -1
  33. package/build/translations/km.js +1 -1
  34. package/build/translations/kn.js +1 -1
  35. package/build/translations/ko.js +1 -1
  36. package/build/translations/ku.js +1 -1
  37. package/build/translations/lt.js +1 -1
  38. package/build/translations/lv.js +1 -1
  39. package/build/translations/ms.js +1 -1
  40. package/build/translations/nb.js +1 -1
  41. package/build/translations/ne.js +1 -1
  42. package/build/translations/nl.js +1 -1
  43. package/build/translations/no.js +1 -1
  44. package/build/translations/pl.js +1 -1
  45. package/build/translations/pt-br.js +1 -1
  46. package/build/translations/pt.js +1 -1
  47. package/build/translations/ro.js +1 -1
  48. package/build/translations/ru.js +1 -1
  49. package/build/translations/si.js +1 -1
  50. package/build/translations/sk.js +1 -1
  51. package/build/translations/sq.js +1 -1
  52. package/build/translations/sr-latn.js +1 -1
  53. package/build/translations/sr.js +1 -1
  54. package/build/translations/sv.js +1 -1
  55. package/build/translations/th.js +1 -1
  56. package/build/translations/ti.js +1 -0
  57. package/build/translations/tk.js +1 -1
  58. package/build/translations/tr.js +1 -1
  59. package/build/translations/tt.js +1 -1
  60. package/build/translations/ug.js +1 -1
  61. package/build/translations/uk.js +1 -1
  62. package/build/translations/ur.js +1 -1
  63. package/build/translations/uz.js +1 -1
  64. package/build/translations/vi.js +1 -1
  65. package/build/translations/zh-cn.js +1 -1
  66. package/build/translations/zh.js +1 -1
  67. package/ckeditor5-metadata.json +1 -1
  68. package/dist/index-content.css +105 -0
  69. package/dist/index-editor.css +129 -0
  70. package/dist/index.css +562 -0
  71. package/dist/index.css.map +1 -0
  72. package/dist/index.js +5637 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/translations/ar.d.ts +8 -0
  75. package/dist/translations/ar.js +5 -0
  76. package/dist/translations/ar.umd.js +11 -0
  77. package/dist/translations/ast.d.ts +8 -0
  78. package/dist/translations/ast.js +5 -0
  79. package/dist/translations/ast.umd.js +11 -0
  80. package/dist/translations/az.d.ts +8 -0
  81. package/dist/translations/az.js +5 -0
  82. package/dist/translations/az.umd.js +11 -0
  83. package/dist/translations/bg.d.ts +8 -0
  84. package/dist/translations/bg.js +5 -0
  85. package/dist/translations/bg.umd.js +11 -0
  86. package/dist/translations/bn.d.ts +8 -0
  87. package/dist/translations/bn.js +5 -0
  88. package/dist/translations/bn.umd.js +11 -0
  89. package/dist/translations/bs.d.ts +8 -0
  90. package/dist/translations/bs.js +5 -0
  91. package/dist/translations/bs.umd.js +11 -0
  92. package/dist/translations/ca.d.ts +8 -0
  93. package/dist/translations/ca.js +5 -0
  94. package/dist/translations/ca.umd.js +11 -0
  95. package/dist/translations/cs.d.ts +8 -0
  96. package/dist/translations/cs.js +5 -0
  97. package/dist/translations/cs.umd.js +11 -0
  98. package/dist/translations/da.d.ts +8 -0
  99. package/dist/translations/da.js +5 -0
  100. package/dist/translations/da.umd.js +11 -0
  101. package/dist/translations/de-ch.d.ts +8 -0
  102. package/dist/translations/de-ch.js +5 -0
  103. package/dist/translations/de-ch.umd.js +11 -0
  104. package/dist/translations/de.d.ts +8 -0
  105. package/dist/translations/de.js +5 -0
  106. package/dist/translations/de.umd.js +11 -0
  107. package/dist/translations/el.d.ts +8 -0
  108. package/dist/translations/el.js +5 -0
  109. package/dist/translations/el.umd.js +11 -0
  110. package/dist/translations/en-au.d.ts +8 -0
  111. package/dist/translations/en-au.js +5 -0
  112. package/dist/translations/en-au.umd.js +11 -0
  113. package/dist/translations/en-gb.d.ts +8 -0
  114. package/dist/translations/en-gb.js +5 -0
  115. package/dist/translations/en-gb.umd.js +11 -0
  116. package/dist/translations/en.d.ts +8 -0
  117. package/dist/translations/en.js +5 -0
  118. package/dist/translations/en.umd.js +11 -0
  119. package/dist/translations/eo.d.ts +8 -0
  120. package/dist/translations/eo.js +5 -0
  121. package/dist/translations/eo.umd.js +11 -0
  122. package/dist/translations/es-co.d.ts +8 -0
  123. package/dist/translations/es-co.js +5 -0
  124. package/dist/translations/es-co.umd.js +11 -0
  125. package/dist/translations/es.d.ts +8 -0
  126. package/dist/translations/es.js +5 -0
  127. package/dist/translations/es.umd.js +11 -0
  128. package/dist/translations/et.d.ts +8 -0
  129. package/dist/translations/et.js +5 -0
  130. package/dist/translations/et.umd.js +11 -0
  131. package/dist/translations/eu.d.ts +8 -0
  132. package/dist/translations/eu.js +5 -0
  133. package/dist/translations/eu.umd.js +11 -0
  134. package/dist/translations/fa.d.ts +8 -0
  135. package/dist/translations/fa.js +5 -0
  136. package/dist/translations/fa.umd.js +11 -0
  137. package/dist/translations/fi.d.ts +8 -0
  138. package/dist/translations/fi.js +5 -0
  139. package/dist/translations/fi.umd.js +11 -0
  140. package/dist/translations/fr.d.ts +8 -0
  141. package/dist/translations/fr.js +5 -0
  142. package/dist/translations/fr.umd.js +11 -0
  143. package/dist/translations/gl.d.ts +8 -0
  144. package/dist/translations/gl.js +5 -0
  145. package/dist/translations/gl.umd.js +11 -0
  146. package/dist/translations/he.d.ts +8 -0
  147. package/dist/translations/he.js +5 -0
  148. package/dist/translations/he.umd.js +11 -0
  149. package/dist/translations/hi.d.ts +8 -0
  150. package/dist/translations/hi.js +5 -0
  151. package/dist/translations/hi.umd.js +11 -0
  152. package/dist/translations/hr.d.ts +8 -0
  153. package/dist/translations/hr.js +5 -0
  154. package/dist/translations/hr.umd.js +11 -0
  155. package/dist/translations/hu.d.ts +8 -0
  156. package/dist/translations/hu.js +5 -0
  157. package/dist/translations/hu.umd.js +11 -0
  158. package/dist/translations/id.d.ts +8 -0
  159. package/dist/translations/id.js +5 -0
  160. package/dist/translations/id.umd.js +11 -0
  161. package/dist/translations/it.d.ts +8 -0
  162. package/dist/translations/it.js +5 -0
  163. package/dist/translations/it.umd.js +11 -0
  164. package/dist/translations/ja.d.ts +8 -0
  165. package/dist/translations/ja.js +5 -0
  166. package/dist/translations/ja.umd.js +11 -0
  167. package/dist/translations/jv.d.ts +8 -0
  168. package/dist/translations/jv.js +5 -0
  169. package/dist/translations/jv.umd.js +11 -0
  170. package/dist/translations/km.d.ts +8 -0
  171. package/dist/translations/km.js +5 -0
  172. package/dist/translations/km.umd.js +11 -0
  173. package/dist/translations/kn.d.ts +8 -0
  174. package/dist/translations/kn.js +5 -0
  175. package/dist/translations/kn.umd.js +11 -0
  176. package/dist/translations/ko.d.ts +8 -0
  177. package/dist/translations/ko.js +5 -0
  178. package/dist/translations/ko.umd.js +11 -0
  179. package/dist/translations/ku.d.ts +8 -0
  180. package/dist/translations/ku.js +5 -0
  181. package/dist/translations/ku.umd.js +11 -0
  182. package/dist/translations/lt.d.ts +8 -0
  183. package/dist/translations/lt.js +5 -0
  184. package/dist/translations/lt.umd.js +11 -0
  185. package/dist/translations/lv.d.ts +8 -0
  186. package/dist/translations/lv.js +5 -0
  187. package/dist/translations/lv.umd.js +11 -0
  188. package/dist/translations/ms.d.ts +8 -0
  189. package/dist/translations/ms.js +5 -0
  190. package/dist/translations/ms.umd.js +11 -0
  191. package/dist/translations/nb.d.ts +8 -0
  192. package/dist/translations/nb.js +5 -0
  193. package/dist/translations/nb.umd.js +11 -0
  194. package/dist/translations/ne.d.ts +8 -0
  195. package/dist/translations/ne.js +5 -0
  196. package/dist/translations/ne.umd.js +11 -0
  197. package/dist/translations/nl.d.ts +8 -0
  198. package/dist/translations/nl.js +5 -0
  199. package/dist/translations/nl.umd.js +11 -0
  200. package/dist/translations/no.d.ts +8 -0
  201. package/dist/translations/no.js +5 -0
  202. package/dist/translations/no.umd.js +11 -0
  203. package/dist/translations/pl.d.ts +8 -0
  204. package/dist/translations/pl.js +5 -0
  205. package/dist/translations/pl.umd.js +11 -0
  206. package/dist/translations/pt-br.d.ts +8 -0
  207. package/dist/translations/pt-br.js +5 -0
  208. package/dist/translations/pt-br.umd.js +11 -0
  209. package/dist/translations/pt.d.ts +8 -0
  210. package/dist/translations/pt.js +5 -0
  211. package/dist/translations/pt.umd.js +11 -0
  212. package/dist/translations/ro.d.ts +8 -0
  213. package/dist/translations/ro.js +5 -0
  214. package/dist/translations/ro.umd.js +11 -0
  215. package/dist/translations/ru.d.ts +8 -0
  216. package/dist/translations/ru.js +5 -0
  217. package/dist/translations/ru.umd.js +11 -0
  218. package/dist/translations/si.d.ts +8 -0
  219. package/dist/translations/si.js +5 -0
  220. package/dist/translations/si.umd.js +11 -0
  221. package/dist/translations/sk.d.ts +8 -0
  222. package/dist/translations/sk.js +5 -0
  223. package/dist/translations/sk.umd.js +11 -0
  224. package/dist/translations/sq.d.ts +8 -0
  225. package/dist/translations/sq.js +5 -0
  226. package/dist/translations/sq.umd.js +11 -0
  227. package/dist/translations/sr-latn.d.ts +8 -0
  228. package/dist/translations/sr-latn.js +5 -0
  229. package/dist/translations/sr-latn.umd.js +11 -0
  230. package/dist/translations/sr.d.ts +8 -0
  231. package/dist/translations/sr.js +5 -0
  232. package/dist/translations/sr.umd.js +11 -0
  233. package/dist/translations/sv.d.ts +8 -0
  234. package/dist/translations/sv.js +5 -0
  235. package/dist/translations/sv.umd.js +11 -0
  236. package/dist/translations/th.d.ts +8 -0
  237. package/dist/translations/th.js +5 -0
  238. package/dist/translations/th.umd.js +11 -0
  239. package/dist/translations/ti.d.ts +8 -0
  240. package/dist/translations/ti.js +5 -0
  241. package/dist/translations/ti.umd.js +11 -0
  242. package/dist/translations/tk.d.ts +8 -0
  243. package/dist/translations/tk.js +5 -0
  244. package/dist/translations/tk.umd.js +11 -0
  245. package/dist/translations/tr.d.ts +8 -0
  246. package/dist/translations/tr.js +5 -0
  247. package/dist/translations/tr.umd.js +11 -0
  248. package/dist/translations/tt.d.ts +8 -0
  249. package/dist/translations/tt.js +5 -0
  250. package/dist/translations/tt.umd.js +11 -0
  251. package/dist/translations/ug.d.ts +8 -0
  252. package/dist/translations/ug.js +5 -0
  253. package/dist/translations/ug.umd.js +11 -0
  254. package/dist/translations/uk.d.ts +8 -0
  255. package/dist/translations/uk.js +5 -0
  256. package/dist/translations/uk.umd.js +11 -0
  257. package/dist/translations/ur.d.ts +8 -0
  258. package/dist/translations/ur.js +5 -0
  259. package/dist/translations/ur.umd.js +11 -0
  260. package/dist/translations/uz.d.ts +8 -0
  261. package/dist/translations/uz.js +5 -0
  262. package/dist/translations/uz.umd.js +11 -0
  263. package/dist/translations/vi.d.ts +8 -0
  264. package/dist/translations/vi.js +5 -0
  265. package/dist/translations/vi.umd.js +11 -0
  266. package/dist/translations/zh-cn.d.ts +8 -0
  267. package/dist/translations/zh-cn.js +5 -0
  268. package/dist/translations/zh-cn.umd.js +11 -0
  269. package/dist/translations/zh.d.ts +8 -0
  270. package/dist/translations/zh.js +5 -0
  271. package/dist/translations/zh.umd.js +11 -0
  272. package/dist/types/augmentation.d.ts +61 -0
  273. package/dist/types/autoimage.d.ts +56 -0
  274. package/dist/types/image/converters.d.ts +70 -0
  275. package/dist/types/image/imageblockediting.d.ts +63 -0
  276. package/dist/types/image/imageediting.d.ts +34 -0
  277. package/dist/types/image/imageinlineediting.d.ts +64 -0
  278. package/dist/types/image/imageloadobserver.d.ts +52 -0
  279. package/dist/types/image/imageplaceholder.d.ts +43 -0
  280. package/dist/types/image/imagetypecommand.d.ts +48 -0
  281. package/dist/types/image/insertimagecommand.d.ts +70 -0
  282. package/dist/types/image/replaceimagesourcecommand.d.ts +55 -0
  283. package/dist/types/image/ui/utils.d.ts +29 -0
  284. package/dist/types/image/utils.d.ts +68 -0
  285. package/dist/types/image.d.ts +38 -0
  286. package/dist/types/imageblock.d.ts +38 -0
  287. package/dist/types/imagecaption/imagecaptionediting.d.ts +93 -0
  288. package/dist/types/imagecaption/imagecaptionui.d.ts +30 -0
  289. package/dist/types/imagecaption/imagecaptionutils.d.ts +42 -0
  290. package/dist/types/imagecaption/toggleimagecaptioncommand.d.ts +70 -0
  291. package/dist/types/imagecaption.d.ts +30 -0
  292. package/dist/types/imageconfig.d.ts +716 -0
  293. package/dist/types/imageinline.d.ts +38 -0
  294. package/dist/types/imageinsert/imageinsertui.d.ts +78 -0
  295. package/dist/types/imageinsert/imageinsertviaurlui.d.ts +48 -0
  296. package/dist/types/imageinsert/ui/imageinsertformview.d.ts +60 -0
  297. package/dist/types/imageinsert/ui/imageinserturlview.d.ts +111 -0
  298. package/dist/types/imageinsert.d.ts +37 -0
  299. package/dist/types/imageinsertviaurl.d.ts +35 -0
  300. package/dist/types/imageresize/imagecustomresizeui.d.ts +65 -0
  301. package/dist/types/imageresize/imageresizebuttons.d.ts +68 -0
  302. package/dist/types/imageresize/imageresizeediting.d.ts +45 -0
  303. package/dist/types/imageresize/imageresizehandles.d.ts +35 -0
  304. package/dist/types/imageresize/resizeimagecommand.d.ts +46 -0
  305. package/dist/types/imageresize/ui/imagecustomresizeformview.d.ts +133 -0
  306. package/dist/types/imageresize/utils/getselectedimageeditornodes.d.ts +28 -0
  307. package/dist/types/imageresize/utils/getselectedimagepossibleresizerange.d.ts +28 -0
  308. package/dist/types/imageresize/utils/getselectedimagewidthinunits.d.ts +22 -0
  309. package/dist/types/imageresize/utils/tryparsedimensionwithunit.d.ts +41 -0
  310. package/dist/types/imageresize.d.ts +32 -0
  311. package/dist/types/imagesizeattributes.d.ts +38 -0
  312. package/dist/types/imagestyle/converters.d.ts +28 -0
  313. package/dist/types/imagestyle/imagestylecommand.d.ts +72 -0
  314. package/dist/types/imagestyle/imagestyleediting.d.ts +54 -0
  315. package/dist/types/imagestyle/imagestyleui.d.ts +60 -0
  316. package/dist/types/imagestyle/utils.d.ts +105 -0
  317. package/dist/types/imagestyle.d.ts +36 -0
  318. package/dist/types/imagetextalternative/imagetextalternativecommand.d.ts +38 -0
  319. package/dist/types/imagetextalternative/imagetextalternativeediting.d.ts +32 -0
  320. package/dist/types/imagetextalternative/imagetextalternativeui.d.ts +72 -0
  321. package/dist/types/imagetextalternative/ui/textalternativeformview.d.ts +94 -0
  322. package/dist/types/imagetextalternative.d.ts +33 -0
  323. package/dist/types/imagetoolbar.d.ts +39 -0
  324. package/dist/types/imageupload/imageuploadediting.d.ts +115 -0
  325. package/dist/types/imageupload/imageuploadprogress.d.ts +46 -0
  326. package/dist/types/imageupload/imageuploadui.d.ts +34 -0
  327. package/dist/types/imageupload/uploadimagecommand.d.ts +64 -0
  328. package/dist/types/imageupload/utils.d.ts +37 -0
  329. package/dist/types/imageupload.d.ts +36 -0
  330. package/dist/types/imageutils.d.ts +129 -0
  331. package/dist/types/index.d.ts +53 -0
  332. package/dist/types/pictureediting.d.ts +92 -0
  333. package/lang/contexts.json +9 -1
  334. package/lang/translations/ar.po +32 -0
  335. package/lang/translations/ast.po +32 -0
  336. package/lang/translations/az.po +32 -0
  337. package/lang/translations/bg.po +32 -0
  338. package/lang/translations/bn.po +32 -0
  339. package/lang/translations/bs.po +32 -0
  340. package/lang/translations/ca.po +32 -0
  341. package/lang/translations/cs.po +32 -0
  342. package/lang/translations/da.po +32 -0
  343. package/lang/translations/de-ch.po +32 -0
  344. package/lang/translations/de.po +32 -0
  345. package/lang/translations/el.po +32 -0
  346. package/lang/translations/en-au.po +32 -0
  347. package/lang/translations/en-gb.po +32 -0
  348. package/lang/translations/en.po +32 -0
  349. package/lang/translations/eo.po +32 -0
  350. package/lang/translations/es-co.po +32 -0
  351. package/lang/translations/es.po +32 -0
  352. package/lang/translations/et.po +32 -0
  353. package/lang/translations/eu.po +32 -0
  354. package/lang/translations/fa.po +32 -0
  355. package/lang/translations/fi.po +32 -0
  356. package/lang/translations/fr.po +32 -0
  357. package/lang/translations/gl.po +32 -0
  358. package/lang/translations/he.po +32 -0
  359. package/lang/translations/hi.po +32 -0
  360. package/lang/translations/hr.po +32 -0
  361. package/lang/translations/hu.po +32 -0
  362. package/lang/translations/id.po +32 -0
  363. package/lang/translations/it.po +32 -0
  364. package/lang/translations/ja.po +32 -0
  365. package/lang/translations/jv.po +32 -0
  366. package/lang/translations/km.po +32 -0
  367. package/lang/translations/kn.po +32 -0
  368. package/lang/translations/ko.po +32 -0
  369. package/lang/translations/ku.po +32 -0
  370. package/lang/translations/lt.po +32 -0
  371. package/lang/translations/lv.po +32 -0
  372. package/lang/translations/ms.po +32 -0
  373. package/lang/translations/nb.po +32 -0
  374. package/lang/translations/ne.po +32 -0
  375. package/lang/translations/nl.po +32 -0
  376. package/lang/translations/no.po +32 -0
  377. package/lang/translations/pl.po +32 -0
  378. package/lang/translations/pt-br.po +32 -0
  379. package/lang/translations/pt.po +32 -0
  380. package/lang/translations/ro.po +32 -0
  381. package/lang/translations/ru.po +32 -0
  382. package/lang/translations/si.po +32 -0
  383. package/lang/translations/sk.po +32 -0
  384. package/lang/translations/sq.po +32 -0
  385. package/lang/translations/sr-latn.po +32 -0
  386. package/lang/translations/sr.po +32 -0
  387. package/lang/translations/sv.po +32 -0
  388. package/lang/translations/th.po +32 -0
  389. package/lang/translations/ti.po +178 -0
  390. package/lang/translations/tk.po +32 -0
  391. package/lang/translations/tr.po +32 -0
  392. package/lang/translations/tt.po +32 -0
  393. package/lang/translations/ug.po +32 -0
  394. package/lang/translations/uk.po +32 -0
  395. package/lang/translations/ur.po +32 -0
  396. package/lang/translations/uz.po +32 -0
  397. package/lang/translations/vi.po +32 -0
  398. package/lang/translations/zh-cn.po +32 -0
  399. package/lang/translations/zh.po +32 -0
  400. package/package.json +4 -3
  401. package/src/augmentation.d.ts +2 -1
  402. package/src/imageresize/imagecustomresizeui.d.ts +61 -0
  403. package/src/imageresize/imagecustomresizeui.js +168 -0
  404. package/src/imageresize/imageresizebuttons.d.ts +0 -3
  405. package/src/imageresize/imageresizebuttons.js +95 -23
  406. package/src/imageresize/imageresizeediting.js +9 -2
  407. package/src/imageresize/imageresizehandles.js +1 -2
  408. package/src/imageresize/ui/imagecustomresizeformview.d.ts +129 -0
  409. package/src/imageresize/ui/imagecustomresizeformview.js +186 -0
  410. package/src/imageresize/utils/getselectedimageeditornodes.d.ts +24 -0
  411. package/src/imageresize/utils/getselectedimageeditornodes.js +24 -0
  412. package/src/imageresize/utils/getselectedimagepossibleresizerange.d.ts +24 -0
  413. package/src/imageresize/utils/getselectedimagepossibleresizerange.js +32 -0
  414. package/src/imageresize/utils/getselectedimagewidthinunits.d.ts +18 -0
  415. package/src/imageresize/utils/getselectedimagewidthinunits.js +41 -0
  416. package/src/imageresize/utils/tryparsedimensionwithunit.d.ts +37 -0
  417. package/src/imageresize/utils/tryparsedimensionwithunit.js +56 -0
  418. package/src/imageresize.d.ts +2 -1
  419. package/src/imageresize.js +2 -1
  420. package/src/imageupload/imageuploadediting.js +9 -0
  421. package/src/index.d.ts +1 -0
  422. package/src/index.js +1 -0
  423. package/theme/imagecaption.css +15 -1
  424. package/theme/imagecustomresizeform.css +33 -0
@@ -0,0 +1,38 @@
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 image/imageinline
11
+ */
12
+ import { Plugin } from 'ckeditor5/src/core.js';
13
+ import { Widget } from 'ckeditor5/src/widget.js';
14
+ import ImageTextAlternative from './imagetextalternative.js';
15
+ import ImageInlineEditing from './image/imageinlineediting.js';
16
+ import ImageInsertUI from './imageinsert/imageinsertui.js';
17
+ import '../theme/image.css';
18
+ /**
19
+ * The image inline plugin.
20
+ *
21
+ * This is a "glue" plugin which loads the following plugins:
22
+ *
23
+ * * {@link module:image/image/imageinlineediting~ImageInlineEditing},
24
+ * * {@link module:image/imagetextalternative~ImageTextAlternative}.
25
+ *
26
+ * Usually, it is used in conjunction with other plugins from this package. See the {@glink api/image package page}
27
+ * for more information.
28
+ */
29
+ export default class ImageInline extends Plugin {
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get requires(): readonly [typeof ImageInlineEditing, typeof Widget, typeof ImageTextAlternative, typeof ImageInsertUI];
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static get pluginName(): "ImageInline";
38
+ }
@@ -0,0 +1,78 @@
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 image/imageinsert/imageinsertui
11
+ */
12
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
13
+ import { type Observable } from 'ckeditor5/src/utils.js';
14
+ import { type ButtonView, type DropdownView, type FocusableView } from 'ckeditor5/src/ui.js';
15
+ import ImageUtils from '../imageutils.js';
16
+ /**
17
+ * The image insert dropdown plugin.
18
+ *
19
+ * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}
20
+ * and {@glink features/images/images-inserting Insert images via source URL} documentation.
21
+ *
22
+ * Adds the `'insertImage'` dropdown to the {@link module:ui/componentfactory~ComponentFactory UI component factory}
23
+ * and also the `imageInsert` dropdown as an alias for backward compatibility.
24
+ */
25
+ export default class ImageInsertUI extends Plugin {
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): "ImageInsertUI";
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static get requires(): readonly [typeof ImageUtils];
34
+ /**
35
+ * The dropdown view responsible for displaying the image insert UI.
36
+ */
37
+ dropdownView?: DropdownView;
38
+ /**
39
+ * Observable property used to alter labels while some image is selected and when it is not.
40
+ *
41
+ * @observable
42
+ */
43
+ isImageSelected: boolean;
44
+ /**
45
+ * Registered integrations map.
46
+ */
47
+ private _integrations;
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ constructor(editor: Editor);
52
+ /**
53
+ * @inheritDoc
54
+ */
55
+ init(): void;
56
+ /**
57
+ * Registers the insert image dropdown integration.
58
+ */
59
+ registerIntegration({ name, observable, buttonViewCreator, formViewCreator, requiresForm }: {
60
+ name: string;
61
+ observable: (Observable & {
62
+ isEnabled: boolean;
63
+ }) | (() => Observable & {
64
+ isEnabled: boolean;
65
+ });
66
+ buttonViewCreator: (isOnlyOne: boolean) => ButtonView;
67
+ formViewCreator: (isOnlyOne: boolean) => FocusableView;
68
+ requiresForm?: boolean;
69
+ }): void;
70
+ /**
71
+ * Creates the toolbar component.
72
+ */
73
+ private _createToolbarComponent;
74
+ /**
75
+ * Validates the integrations list.
76
+ */
77
+ private _prepareIntegrations;
78
+ }
@@ -0,0 +1,48 @@
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 image/imageinsert/imageinsertviaurlui
11
+ */
12
+ import { Plugin } from 'ckeditor5/src/core.js';
13
+ import ImageInsertUI from './imageinsertui.js';
14
+ /**
15
+ * The image insert via URL plugin (UI part).
16
+ *
17
+ * For a detailed overview, check the {@glink features/images/images-inserting
18
+ * Insert images via source URL} documentation.
19
+ *
20
+ * This plugin registers the {@link module:image/imageinsert/imageinsertui~ImageInsertUI} integration for `url`.
21
+ */
22
+ export default class ImageInsertViaUrlUI extends Plugin {
23
+ private _imageInsertUI;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "ImageInsertViaUrlUI";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get requires(): readonly [typeof ImageInsertUI];
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ afterInit(): void;
36
+ /**
37
+ * Creates the view displayed in the dropdown.
38
+ */
39
+ private _createInsertUrlView;
40
+ /**
41
+ * Creates the toolbar button.
42
+ */
43
+ private _createInsertUrlButton;
44
+ /**
45
+ * Closes the dropdown.
46
+ */
47
+ private _closePanel;
48
+ }
@@ -0,0 +1,60 @@
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 image/imageinsert/ui/imageinsertformview
11
+ */
12
+ import { View, ViewCollection, FocusCycler, type FocusableView } from 'ckeditor5/src/ui.js';
13
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
14
+ import '../../../theme/imageinsert.css';
15
+ /**
16
+ * The view displayed in the insert image dropdown.
17
+ *
18
+ * See {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.
19
+ */
20
+ export default class ImageInsertFormView extends View {
21
+ /**
22
+ * Tracks information about DOM focus in the form.
23
+ */
24
+ readonly focusTracker: FocusTracker;
25
+ /**
26
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
27
+ */
28
+ readonly keystrokes: KeystrokeHandler;
29
+ /**
30
+ * A collection of views that can be focused in the form.
31
+ */
32
+ protected readonly _focusables: ViewCollection<FocusableView>;
33
+ /**
34
+ * Helps cycling over {@link #_focusables} in the form.
35
+ */
36
+ protected readonly _focusCycler: FocusCycler;
37
+ /**
38
+ * A collection of the defined integrations for inserting the images.
39
+ */
40
+ private readonly children;
41
+ /**
42
+ * Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.
43
+ *
44
+ * @param locale The localization services instance.
45
+ * @param integrations An integrations object that contains components (or tokens for components) to be shown in the panel view.
46
+ */
47
+ constructor(locale: Locale, integrations?: Array<FocusableView>);
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ render(): void;
52
+ /**
53
+ * @inheritDoc
54
+ */
55
+ destroy(): void;
56
+ /**
57
+ * Focuses the first {@link #_focusables focusable} in the form.
58
+ */
59
+ focus(): void;
60
+ }
@@ -0,0 +1,111 @@
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 { ButtonView, View, FocusCycler, LabeledFieldView, type InputTextView } from 'ckeditor5/src/ui.js';
10
+ import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
11
+ /**
12
+ * The insert an image via URL view.
13
+ *
14
+ * See {@link module:image/imageinsert/imageinsertviaurlui~ImageInsertViaUrlUI}.
15
+ */
16
+ export default class ImageInsertUrlView extends View {
17
+ /**
18
+ * The URL input field view.
19
+ */
20
+ urlInputView: LabeledFieldView<InputTextView>;
21
+ /**
22
+ * The "insert/update" button view.
23
+ */
24
+ insertButtonView: ButtonView;
25
+ /**
26
+ * The "cancel" button view.
27
+ */
28
+ cancelButtonView: ButtonView;
29
+ /**
30
+ * The value of the URL input.
31
+ *
32
+ * @observable
33
+ */
34
+ imageURLInputValue: string;
35
+ /**
36
+ * Observable property used to alter labels while some image is selected and when it is not.
37
+ *
38
+ * @observable
39
+ */
40
+ isImageSelected: boolean;
41
+ /**
42
+ * Observable property indicating whether the form interactive elements should be enabled.
43
+ *
44
+ * @observable
45
+ */
46
+ isEnabled: boolean;
47
+ /**
48
+ * Tracks information about DOM focus in the form.
49
+ */
50
+ readonly focusTracker: FocusTracker;
51
+ /**
52
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
53
+ */
54
+ readonly keystrokes: KeystrokeHandler;
55
+ /**
56
+ * Helps cycling over {@link #_focusables} in the form.
57
+ */
58
+ readonly focusCycler: FocusCycler;
59
+ /**
60
+ * A collection of views that can be focused in the form.
61
+ */
62
+ private readonly _focusables;
63
+ /**
64
+ * Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.
65
+ *
66
+ * @param locale The localization services instance.
67
+ */
68
+ constructor(locale: Locale);
69
+ /**
70
+ * @inheritDoc
71
+ */
72
+ render(): void;
73
+ /**
74
+ * @inheritDoc
75
+ */
76
+ destroy(): void;
77
+ /**
78
+ * Creates the {@link #urlInputView}.
79
+ */
80
+ private _createUrlInputView;
81
+ /**
82
+ * Creates the {@link #insertButtonView}.
83
+ */
84
+ private _createInsertButton;
85
+ /**
86
+ * Creates the {@link #cancelButtonView}.
87
+ */
88
+ private _createCancelButton;
89
+ /**
90
+ * Focuses the view.
91
+ */
92
+ focus(direction: 1 | -1): void;
93
+ }
94
+ /**
95
+ * Fired when the form view is submitted.
96
+ *
97
+ * @eventName ~ImageInsertUrlView#submit
98
+ */
99
+ export type ImageInsertUrlViewSubmitEvent = {
100
+ name: 'submit';
101
+ args: [];
102
+ };
103
+ /**
104
+ * Fired when the form view is canceled.
105
+ *
106
+ * @eventName ~ImageInsertUrlView#cancel
107
+ */
108
+ export type ImageInsertUrlViewCancelEvent = {
109
+ name: 'cancel';
110
+ args: [];
111
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
7
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
8
+ */
9
+ /**
10
+ * @module image/imageinsert
11
+ */
12
+ import { Plugin } from 'ckeditor5/src/core.js';
13
+ import ImageUpload from './imageupload.js';
14
+ import ImageInsertViaUrl from './imageinsertviaurl.js';
15
+ import ImageInsertUI from './imageinsert/imageinsertui.js';
16
+ /**
17
+ * The image insert plugin.
18
+ *
19
+ * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}
20
+ * and {@glink features/images/images-inserting Insert images via source URL} documentation.
21
+ *
22
+ * This plugin does not do anything directly, but it loads a set of specific plugins
23
+ * to enable image uploading or inserting via implemented integrations:
24
+ *
25
+ * * {@link module:image/imageupload~ImageUpload}
26
+ * * {@link module:image/imageinsert/imageinsertui~ImageInsertUI}
27
+ */
28
+ export default class ImageInsert extends Plugin {
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static get pluginName(): "ImageInsert";
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ static get requires(): readonly [typeof ImageUpload, typeof ImageInsertViaUrl, typeof ImageInsertUI];
37
+ }
@@ -0,0 +1,35 @@
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 image/imageinsertviaurl
11
+ */
12
+ import { Plugin } from 'ckeditor5/src/core.js';
13
+ import ImageInsertUI from './imageinsert/imageinsertui.js';
14
+ import ImageInsertViaUrlUI from './imageinsert/imageinsertviaurlui.js';
15
+ /**
16
+ * The image insert via URL plugin.
17
+ *
18
+ * For a detailed overview, check the {@glink features/images/images-inserting
19
+ * Insert images via source URL} documentation.
20
+ *
21
+ * This plugin does not do anything directly, but it loads a set of specific plugins
22
+ * to enable image inserting via implemented integrations:
23
+ *
24
+ * * {@link module:image/imageinsert/imageinsertui~ImageInsertUI},
25
+ */
26
+ export default class ImageInsertViaUrl extends Plugin {
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get pluginName(): "ImageInsertViaUrl";
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ static get requires(): readonly [typeof ImageInsertViaUrlUI, typeof ImageInsertUI];
35
+ }
@@ -0,0 +1,65 @@
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 image/imageresize/imagecustomresizeui
11
+ */
12
+ import { Plugin } from 'ckeditor5/src/core.js';
13
+ import { ContextualBalloon } from 'ckeditor5/src/ui.js';
14
+ /**
15
+ * The custom resize image UI plugin.
16
+ *
17
+ * The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.
18
+ */
19
+ export default class ImageCustomResizeUI extends Plugin {
20
+ /**
21
+ * The contextual balloon plugin instance.
22
+ */
23
+ private _balloon?;
24
+ /**
25
+ * A form containing a textarea and buttons, used to change the `alt` text value.
26
+ */
27
+ private _form?;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get requires(): readonly [typeof ContextualBalloon];
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ static get pluginName(): "ImageCustomResizeUI";
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ destroy(): void;
40
+ /**
41
+ * Creates the {@link module:image/imageresize/ui/imagecustomresizeformview~ImageCustomResizeFormView}
42
+ * form.
43
+ */
44
+ private _createForm;
45
+ /**
46
+ * Shows the {@link #_form} in the {@link #_balloon}.
47
+ *
48
+ * @internal
49
+ */
50
+ _showForm(unit: string): void;
51
+ /**
52
+ * Removes the {@link #_form} from the {@link #_balloon}.
53
+ *
54
+ * @param focusEditable Controls whether the editing view is focused afterwards.
55
+ */
56
+ private _hideForm;
57
+ /**
58
+ * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.
59
+ */
60
+ private get _isVisible();
61
+ /**
62
+ * Returns `true` when the {@link #_form} is in the {@link #_balloon}.
63
+ */
64
+ private get _isInBalloon();
65
+ }
@@ -0,0 +1,68 @@
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 { Plugin, type Editor } from 'ckeditor5/src/core.js';
10
+ import ImageResizeEditing from './imageresizeediting.js';
11
+ /**
12
+ * The image resize buttons plugin.
13
+ *
14
+ * It adds a possibility to resize images using the toolbar dropdown or individual buttons, depending on the plugin configuration.
15
+ */
16
+ export default class ImageResizeButtons extends Plugin {
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get requires(): readonly [typeof ImageResizeEditing];
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get pluginName(): "ImageResizeButtons";
25
+ /**
26
+ * The resize unit.
27
+ * @default '%'
28
+ */
29
+ private readonly _resizeUnit;
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ constructor(editor: Editor);
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ init(): void;
38
+ /**
39
+ * A helper function that creates a standalone button component for the plugin.
40
+ *
41
+ * @param resizeOption A model of the resize option.
42
+ */
43
+ private _registerImageResizeButton;
44
+ /**
45
+ * A helper function that creates a dropdown component for the plugin containing all the resize options defined in
46
+ * the editor configuration.
47
+ *
48
+ * @param options An array of configured options.
49
+ */
50
+ private _registerImageResizeDropdown;
51
+ /**
52
+ * A helper function for creating an option label value string.
53
+ *
54
+ * @param option A resize option object.
55
+ * @param forTooltip An optional flag for creating a tooltip label.
56
+ * @returns A user-defined label combined from the numeric value and the resize unit or the default label
57
+ * for reset options (`Original`).
58
+ */
59
+ private _getOptionLabelValue;
60
+ /**
61
+ * A helper function that parses the resize options and returns list item definitions ready for use in the dropdown.
62
+ *
63
+ * @param options The resize options.
64
+ * @param command The resize image command.
65
+ * @returns Dropdown item definitions.
66
+ */
67
+ private _getResizeDropdownListItemDefinitions;
68
+ }
@@ -0,0 +1,45 @@
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, Plugin } from 'ckeditor5/src/core.js';
10
+ import ImageUtils from '../imageutils.js';
11
+ /**
12
+ * The image resize editing feature.
13
+ *
14
+ * It adds the ability to resize each image using handles or manually by
15
+ * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.
16
+ */
17
+ export default class ImageResizeEditing extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires(): readonly [typeof ImageUtils];
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "ImageResizeEditing";
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ constructor(editor: Editor);
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ init(): void;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ afterInit(): void;
38
+ private _registerSchema;
39
+ /**
40
+ * Registers image resize converters.
41
+ *
42
+ * @param imageType The type of the image.
43
+ */
44
+ private _registerConverters;
45
+ }
@@ -0,0 +1,35 @@
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 { Plugin } from 'ckeditor5/src/core.js';
10
+ import { WidgetResize } from 'ckeditor5/src/widget.js';
11
+ import ImageUtils from '../imageutils.js';
12
+ /**
13
+ * The image resize by handles feature.
14
+ *
15
+ * It adds the ability to resize each image using handles or manually by
16
+ * {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.
17
+ */
18
+ export default class ImageResizeHandles extends Plugin {
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get requires(): readonly [typeof WidgetResize, typeof ImageUtils];
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get pluginName(): "ImageResizeHandles";
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ init(): void;
31
+ /**
32
+ * Attaches the listeners responsible for creating a resizer for each image, except for images inside the HTML embed preview.
33
+ */
34
+ private _setupResizerCreator;
35
+ }
@@ -0,0 +1,46 @@
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 image/imageresize/resizeimagecommand
11
+ */
12
+ import { Command } from 'ckeditor5/src/core.js';
13
+ /**
14
+ * The resize image command. Currently, it only supports the width attribute.
15
+ */
16
+ export default class ResizeImageCommand extends Command {
17
+ /**
18
+ * Desired image width and height.
19
+ */
20
+ value: null | {
21
+ width: string | null;
22
+ height: string | null;
23
+ };
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ refresh(): void;
28
+ /**
29
+ * Executes the command.
30
+ *
31
+ * ```ts
32
+ * // Sets the width to 50%:
33
+ * editor.execute( 'resizeImage', { width: '50%' } );
34
+ *
35
+ * // Removes the width attribute:
36
+ * editor.execute( 'resizeImage', { width: null } );
37
+ * ```
38
+ *
39
+ * @param options
40
+ * @param options.width The new width of the image.
41
+ * @fires execute
42
+ */
43
+ execute(options: {
44
+ width: string | null;
45
+ }): void;
46
+ }