@ckeditor/ckeditor5-image 44.1.0 → 44.2.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.
- package/LICENSE.md +1 -1
- package/build/image.js +2 -2
- package/ckeditor5-metadata.json +14 -0
- package/dist/index-content.css +2 -2
- package/dist/index-editor.css +2 -2
- package/dist/index.css +18 -18
- package/dist/index.css.map +1 -1
- package/dist/index.js +41 -32
- package/dist/index.js.map +1 -1
- package/dist/translations/af.d.ts +2 -2
- package/dist/translations/af.js +2 -2
- package/dist/translations/af.umd.js +2 -2
- package/dist/translations/ar.d.ts +2 -2
- package/dist/translations/ar.js +2 -2
- package/dist/translations/ar.umd.js +2 -2
- package/dist/translations/ast.d.ts +2 -2
- package/dist/translations/ast.js +2 -2
- package/dist/translations/ast.umd.js +2 -2
- package/dist/translations/az.d.ts +2 -2
- package/dist/translations/az.js +2 -2
- package/dist/translations/az.umd.js +2 -2
- package/dist/translations/bg.d.ts +2 -2
- package/dist/translations/bg.js +2 -2
- package/dist/translations/bg.umd.js +2 -2
- package/dist/translations/bn.d.ts +2 -2
- package/dist/translations/bn.js +2 -2
- package/dist/translations/bn.umd.js +2 -2
- package/dist/translations/bs.d.ts +2 -2
- package/dist/translations/bs.js +2 -2
- package/dist/translations/bs.umd.js +2 -2
- package/dist/translations/ca.d.ts +2 -2
- package/dist/translations/ca.js +2 -2
- package/dist/translations/ca.umd.js +2 -2
- package/dist/translations/cs.d.ts +2 -2
- package/dist/translations/cs.js +2 -2
- package/dist/translations/cs.umd.js +2 -2
- package/dist/translations/da.d.ts +2 -2
- package/dist/translations/da.js +2 -2
- package/dist/translations/da.umd.js +2 -2
- package/dist/translations/de-ch.d.ts +2 -2
- package/dist/translations/de-ch.js +2 -2
- package/dist/translations/de-ch.umd.js +2 -2
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +2 -2
- package/dist/translations/de.umd.js +2 -2
- package/dist/translations/el.d.ts +2 -2
- package/dist/translations/el.js +2 -2
- package/dist/translations/el.umd.js +2 -2
- package/dist/translations/en-au.d.ts +2 -2
- package/dist/translations/en-au.js +2 -2
- package/dist/translations/en-au.umd.js +2 -2
- package/dist/translations/en-gb.d.ts +2 -2
- package/dist/translations/en-gb.js +2 -2
- package/dist/translations/en-gb.umd.js +2 -2
- package/dist/translations/en.d.ts +2 -2
- package/dist/translations/en.js +2 -2
- package/dist/translations/en.umd.js +2 -2
- package/dist/translations/eo.d.ts +2 -2
- package/dist/translations/eo.js +2 -2
- package/dist/translations/eo.umd.js +2 -2
- package/dist/translations/es-co.d.ts +2 -2
- package/dist/translations/es-co.js +2 -2
- package/dist/translations/es-co.umd.js +2 -2
- package/dist/translations/es.d.ts +2 -2
- package/dist/translations/es.js +2 -2
- package/dist/translations/es.umd.js +2 -2
- package/dist/translations/et.d.ts +2 -2
- package/dist/translations/et.js +2 -2
- package/dist/translations/et.umd.js +2 -2
- package/dist/translations/eu.d.ts +2 -2
- package/dist/translations/eu.js +2 -2
- package/dist/translations/eu.umd.js +2 -2
- package/dist/translations/fa.d.ts +2 -2
- package/dist/translations/fa.js +2 -2
- package/dist/translations/fa.umd.js +2 -2
- package/dist/translations/fi.d.ts +2 -2
- package/dist/translations/fi.js +2 -2
- package/dist/translations/fi.umd.js +2 -2
- package/dist/translations/fr.d.ts +2 -2
- package/dist/translations/fr.js +2 -2
- package/dist/translations/fr.umd.js +2 -2
- package/dist/translations/gl.d.ts +2 -2
- package/dist/translations/gl.js +2 -2
- package/dist/translations/gl.umd.js +2 -2
- package/dist/translations/gu.d.ts +2 -2
- package/dist/translations/gu.js +2 -2
- package/dist/translations/gu.umd.js +2 -2
- package/dist/translations/he.d.ts +2 -2
- package/dist/translations/he.js +2 -2
- package/dist/translations/he.umd.js +2 -2
- package/dist/translations/hi.d.ts +2 -2
- package/dist/translations/hi.js +2 -2
- package/dist/translations/hi.umd.js +2 -2
- package/dist/translations/hr.d.ts +2 -2
- package/dist/translations/hr.js +2 -2
- package/dist/translations/hr.umd.js +2 -2
- package/dist/translations/hu.d.ts +2 -2
- package/dist/translations/hu.js +2 -2
- package/dist/translations/hu.umd.js +2 -2
- package/dist/translations/hy.d.ts +2 -2
- package/dist/translations/hy.js +2 -2
- package/dist/translations/hy.umd.js +2 -2
- package/dist/translations/id.d.ts +2 -2
- package/dist/translations/id.js +2 -2
- package/dist/translations/id.umd.js +2 -2
- package/dist/translations/it.d.ts +2 -2
- package/dist/translations/it.js +2 -2
- package/dist/translations/it.umd.js +2 -2
- package/dist/translations/ja.d.ts +2 -2
- package/dist/translations/ja.js +2 -2
- package/dist/translations/ja.umd.js +2 -2
- package/dist/translations/jv.d.ts +2 -2
- package/dist/translations/jv.js +2 -2
- package/dist/translations/jv.umd.js +2 -2
- package/dist/translations/kk.d.ts +2 -2
- package/dist/translations/kk.js +2 -2
- package/dist/translations/kk.umd.js +2 -2
- package/dist/translations/km.d.ts +2 -2
- package/dist/translations/km.js +2 -2
- package/dist/translations/km.umd.js +2 -2
- package/dist/translations/kn.d.ts +2 -2
- package/dist/translations/kn.js +2 -2
- package/dist/translations/kn.umd.js +2 -2
- package/dist/translations/ko.d.ts +2 -2
- package/dist/translations/ko.js +2 -2
- package/dist/translations/ko.umd.js +2 -2
- package/dist/translations/ku.d.ts +2 -2
- package/dist/translations/ku.js +2 -2
- package/dist/translations/ku.umd.js +2 -2
- package/dist/translations/lt.d.ts +2 -2
- package/dist/translations/lt.js +2 -2
- package/dist/translations/lt.umd.js +2 -2
- package/dist/translations/lv.d.ts +2 -2
- package/dist/translations/lv.js +2 -2
- package/dist/translations/lv.umd.js +2 -2
- package/dist/translations/ms.d.ts +2 -2
- package/dist/translations/ms.js +2 -2
- package/dist/translations/ms.umd.js +2 -2
- package/dist/translations/nb.d.ts +2 -2
- package/dist/translations/nb.js +2 -2
- package/dist/translations/nb.umd.js +2 -2
- package/dist/translations/ne.d.ts +2 -2
- package/dist/translations/ne.js +2 -2
- package/dist/translations/ne.umd.js +2 -2
- package/dist/translations/nl.d.ts +2 -2
- package/dist/translations/nl.js +2 -2
- package/dist/translations/nl.umd.js +2 -2
- package/dist/translations/no.d.ts +2 -2
- package/dist/translations/no.js +2 -2
- package/dist/translations/no.umd.js +2 -2
- package/dist/translations/oc.d.ts +2 -2
- package/dist/translations/oc.js +2 -2
- package/dist/translations/oc.umd.js +2 -2
- package/dist/translations/pl.d.ts +2 -2
- package/dist/translations/pl.js +2 -2
- package/dist/translations/pl.umd.js +2 -2
- package/dist/translations/pt-br.d.ts +2 -2
- package/dist/translations/pt-br.js +2 -2
- package/dist/translations/pt-br.umd.js +2 -2
- package/dist/translations/pt.d.ts +2 -2
- package/dist/translations/pt.js +2 -2
- package/dist/translations/pt.umd.js +2 -2
- package/dist/translations/ro.d.ts +2 -2
- package/dist/translations/ro.js +2 -2
- package/dist/translations/ro.umd.js +2 -2
- package/dist/translations/ru.d.ts +2 -2
- package/dist/translations/ru.js +2 -2
- package/dist/translations/ru.umd.js +2 -2
- package/dist/translations/si.d.ts +2 -2
- package/dist/translations/si.js +2 -2
- package/dist/translations/si.umd.js +2 -2
- package/dist/translations/sk.d.ts +2 -2
- package/dist/translations/sk.js +2 -2
- package/dist/translations/sk.umd.js +2 -2
- package/dist/translations/sl.d.ts +2 -2
- package/dist/translations/sl.js +2 -2
- package/dist/translations/sl.umd.js +2 -2
- package/dist/translations/sq.d.ts +2 -2
- package/dist/translations/sq.js +2 -2
- package/dist/translations/sq.umd.js +2 -2
- package/dist/translations/sr-latn.d.ts +2 -2
- package/dist/translations/sr-latn.js +2 -2
- package/dist/translations/sr-latn.umd.js +2 -2
- package/dist/translations/sr.d.ts +2 -2
- package/dist/translations/sr.js +2 -2
- package/dist/translations/sr.umd.js +2 -2
- package/dist/translations/sv.d.ts +2 -2
- package/dist/translations/sv.js +2 -2
- package/dist/translations/sv.umd.js +2 -2
- package/dist/translations/th.d.ts +2 -2
- package/dist/translations/th.js +2 -2
- package/dist/translations/th.umd.js +2 -2
- package/dist/translations/ti.d.ts +2 -2
- package/dist/translations/ti.js +2 -2
- package/dist/translations/ti.umd.js +2 -2
- package/dist/translations/tk.d.ts +2 -2
- package/dist/translations/tk.js +2 -2
- package/dist/translations/tk.umd.js +2 -2
- package/dist/translations/tr.d.ts +2 -2
- package/dist/translations/tr.js +2 -2
- package/dist/translations/tr.umd.js +2 -2
- package/dist/translations/tt.d.ts +2 -2
- package/dist/translations/tt.js +2 -2
- package/dist/translations/tt.umd.js +2 -2
- package/dist/translations/ug.d.ts +2 -2
- package/dist/translations/ug.js +2 -2
- package/dist/translations/ug.umd.js +2 -2
- package/dist/translations/uk.d.ts +2 -2
- package/dist/translations/uk.js +2 -2
- package/dist/translations/uk.umd.js +2 -2
- package/dist/translations/ur.d.ts +2 -2
- package/dist/translations/ur.js +2 -2
- package/dist/translations/ur.umd.js +2 -2
- package/dist/translations/uz.d.ts +2 -2
- package/dist/translations/uz.js +2 -2
- package/dist/translations/uz.umd.js +2 -2
- package/dist/translations/vi.d.ts +2 -2
- package/dist/translations/vi.js +2 -2
- package/dist/translations/vi.umd.js +2 -2
- package/dist/translations/zh-cn.d.ts +2 -2
- package/dist/translations/zh-cn.js +2 -2
- package/dist/translations/zh-cn.umd.js +2 -2
- package/dist/translations/zh.d.ts +2 -2
- package/dist/translations/zh.js +2 -2
- package/dist/translations/zh.umd.js +2 -2
- package/lang/translations/af.po +1 -1
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bn.po +1 -1
- package/lang/translations/bs.po +1 -1
- package/lang/translations/ca.po +1 -1
- package/lang/translations/cs.po +1 -1
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es-co.po +1 -1
- package/lang/translations/es.po +1 -1
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/gu.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/hy.po +1 -1
- package/lang/translations/id.po +1 -1
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/jv.po +1 -1
- package/lang/translations/kk.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/ms.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +1 -1
- package/lang/translations/no.po +1 -1
- package/lang/translations/oc.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +1 -1
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/si.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sl.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +1 -1
- package/lang/translations/sr.po +1 -1
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/ti.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/tt.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/ur.po +1 -1
- package/lang/translations/uz.po +1 -1
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +1 -1
- package/lang/translations/zh.po +1 -1
- package/package.json +34 -12
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/autoimage.d.ts +1 -1
- package/src/autoimage.js +1 -1
- package/src/image/converters.d.ts +1 -1
- package/src/image/converters.js +1 -1
- package/src/image/imageblockediting.d.ts +1 -1
- package/src/image/imageblockediting.js +1 -1
- package/src/image/imageediting.d.ts +1 -1
- package/src/image/imageediting.js +1 -1
- package/src/image/imageinlineediting.d.ts +1 -1
- package/src/image/imageinlineediting.js +1 -1
- package/src/image/imageloadobserver.d.ts +1 -1
- package/src/image/imageloadobserver.js +1 -1
- package/src/image/imageplaceholder.d.ts +1 -1
- package/src/image/imageplaceholder.js +1 -1
- package/src/image/imagetypecommand.d.ts +1 -1
- package/src/image/imagetypecommand.js +1 -1
- package/src/image/insertimagecommand.d.ts +3 -1
- package/src/image/insertimagecommand.js +5 -1
- package/src/image/replaceimagesourcecommand.d.ts +1 -1
- package/src/image/replaceimagesourcecommand.js +1 -1
- package/src/image/ui/utils.d.ts +1 -1
- package/src/image/ui/utils.js +1 -1
- package/src/image/utils.d.ts +1 -1
- package/src/image/utils.js +1 -1
- package/src/image.d.ts +1 -1
- package/src/image.js +1 -1
- package/src/imageblock.d.ts +1 -1
- package/src/imageblock.js +1 -1
- package/src/imagecaption/imagecaptionediting.d.ts +1 -1
- package/src/imagecaption/imagecaptionediting.js +1 -1
- package/src/imagecaption/imagecaptionui.d.ts +1 -1
- package/src/imagecaption/imagecaptionui.js +1 -1
- package/src/imagecaption/imagecaptionutils.d.ts +1 -1
- package/src/imagecaption/imagecaptionutils.js +1 -1
- package/src/imagecaption/toggleimagecaptioncommand.d.ts +1 -1
- package/src/imagecaption/toggleimagecaptioncommand.js +1 -1
- package/src/imagecaption.d.ts +1 -1
- package/src/imagecaption.js +1 -1
- package/src/imageconfig.d.ts +1 -1
- package/src/imageconfig.js +1 -1
- package/src/imageinline.d.ts +1 -1
- package/src/imageinline.js +1 -1
- package/src/imageinsert/imageinsertui.d.ts +5 -4
- package/src/imageinsert/imageinsertui.js +17 -23
- package/src/imageinsert/imageinsertviaurlui.d.ts +1 -1
- package/src/imageinsert/imageinsertviaurlui.js +1 -1
- package/src/imageinsert/ui/imageinsertformview.d.ts +1 -1
- package/src/imageinsert/ui/imageinsertformview.js +1 -1
- package/src/imageinsert/ui/imageinserturlview.d.ts +1 -1
- package/src/imageinsert/ui/imageinserturlview.js +8 -4
- package/src/imageinsert.d.ts +1 -1
- package/src/imageinsert.js +1 -1
- package/src/imageinsertviaurl.d.ts +1 -1
- package/src/imageinsertviaurl.js +1 -1
- package/src/imageresize/imagecustomresizeui.d.ts +1 -1
- package/src/imageresize/imagecustomresizeui.js +1 -1
- package/src/imageresize/imageresizebuttons.d.ts +1 -1
- package/src/imageresize/imageresizebuttons.js +1 -1
- package/src/imageresize/imageresizeediting.d.ts +1 -1
- package/src/imageresize/imageresizeediting.js +1 -1
- package/src/imageresize/imageresizehandles.d.ts +1 -1
- package/src/imageresize/imageresizehandles.js +1 -1
- package/src/imageresize/resizeimagecommand.d.ts +1 -1
- package/src/imageresize/resizeimagecommand.js +1 -1
- package/src/imageresize/ui/imagecustomresizeformview.d.ts +1 -1
- package/src/imageresize/ui/imagecustomresizeformview.js +1 -1
- package/src/imageresize/utils/getselectedimageeditornodes.d.ts +1 -1
- package/src/imageresize/utils/getselectedimageeditornodes.js +1 -1
- package/src/imageresize/utils/getselectedimagepossibleresizerange.d.ts +1 -1
- package/src/imageresize/utils/getselectedimagepossibleresizerange.js +1 -1
- package/src/imageresize/utils/getselectedimagewidthinunits.d.ts +1 -1
- package/src/imageresize/utils/getselectedimagewidthinunits.js +1 -1
- package/src/imageresize/utils/tryparsedimensionwithunit.d.ts +1 -1
- package/src/imageresize/utils/tryparsedimensionwithunit.js +1 -1
- package/src/imageresize.d.ts +1 -1
- package/src/imageresize.js +1 -1
- package/src/imagesizeattributes.d.ts +1 -1
- package/src/imagesizeattributes.js +10 -6
- package/src/imagestyle/converters.d.ts +1 -1
- package/src/imagestyle/converters.js +1 -1
- package/src/imagestyle/imagestylecommand.d.ts +1 -1
- package/src/imagestyle/imagestylecommand.js +1 -1
- package/src/imagestyle/imagestyleediting.d.ts +1 -1
- package/src/imagestyle/imagestyleediting.js +1 -1
- package/src/imagestyle/imagestyleui.d.ts +1 -1
- package/src/imagestyle/imagestyleui.js +1 -1
- package/src/imagestyle/utils.d.ts +1 -1
- package/src/imagestyle/utils.js +1 -1
- package/src/imagestyle.d.ts +1 -1
- package/src/imagestyle.js +1 -1
- package/src/imagetextalternative/imagetextalternativecommand.d.ts +1 -1
- package/src/imagetextalternative/imagetextalternativecommand.js +1 -1
- package/src/imagetextalternative/imagetextalternativeediting.d.ts +1 -1
- package/src/imagetextalternative/imagetextalternativeediting.js +1 -1
- package/src/imagetextalternative/imagetextalternativeui.d.ts +1 -1
- package/src/imagetextalternative/imagetextalternativeui.js +1 -1
- package/src/imagetextalternative/ui/textalternativeformview.d.ts +1 -1
- package/src/imagetextalternative/ui/textalternativeformview.js +1 -1
- package/src/imagetextalternative.d.ts +1 -1
- package/src/imagetextalternative.js +1 -1
- package/src/imagetoolbar.d.ts +1 -1
- package/src/imagetoolbar.js +1 -1
- package/src/imageupload/imageuploadediting.d.ts +1 -1
- package/src/imageupload/imageuploadediting.js +1 -1
- package/src/imageupload/imageuploadprogress.d.ts +1 -1
- package/src/imageupload/imageuploadprogress.js +1 -1
- package/src/imageupload/imageuploadui.d.ts +1 -1
- package/src/imageupload/imageuploadui.js +1 -1
- package/src/imageupload/uploadimagecommand.d.ts +1 -1
- package/src/imageupload/uploadimagecommand.js +1 -1
- package/src/imageupload/utils.d.ts +1 -1
- package/src/imageupload/utils.js +1 -1
- package/src/imageupload.d.ts +1 -1
- package/src/imageupload.js +1 -1
- package/src/imageutils.d.ts +1 -1
- package/src/imageutils.js +1 -1
- package/src/index.d.ts +2 -1
- package/src/index.js +1 -1
- package/src/pictureediting.d.ts +1 -1
- package/src/pictureediting.js +1 -1
- package/theme/image.css +1 -1
- package/theme/imagecaption.css +1 -1
- package/theme/imagecustomresizeform.css +1 -1
- package/theme/imageinsert.css +1 -1
- package/theme/imageplaceholder.css +1 -1
- package/theme/imageresize.css +1 -1
- package/theme/imagestyle.css +1 -1
- package/theme/imageuploadicon.css +1 -1
- package/theme/imageuploadloader.css +1 -1
- package/theme/imageuploadprogress.css +1 -1
- package/theme/textalternativeform.css +1 -1
- package/dist/augmentation.d.ts +0 -61
- package/dist/autoimage.d.ts +0 -60
- package/dist/image/converters.d.ts +0 -70
- package/dist/image/imageblockediting.d.ts +0 -67
- package/dist/image/imageediting.d.ts +0 -38
- package/dist/image/imageinlineediting.d.ts +0 -68
- package/dist/image/imageloadobserver.d.ts +0 -52
- package/dist/image/imageplaceholder.d.ts +0 -47
- package/dist/image/imagetypecommand.d.ts +0 -48
- package/dist/image/insertimagecommand.d.ts +0 -72
- package/dist/image/replaceimagesourcecommand.d.ts +0 -55
- package/dist/image/ui/utils.d.ts +0 -29
- package/dist/image/utils.d.ts +0 -68
- package/dist/image.d.ts +0 -42
- package/dist/imageblock.d.ts +0 -42
- package/dist/imagecaption/imagecaptionediting.d.ts +0 -97
- package/dist/imagecaption/imagecaptionui.d.ts +0 -34
- package/dist/imagecaption/imagecaptionutils.d.ts +0 -46
- package/dist/imagecaption/toggleimagecaptioncommand.d.ts +0 -70
- package/dist/imagecaption.d.ts +0 -34
- package/dist/imageconfig.d.ts +0 -716
- package/dist/imageinline.d.ts +0 -42
- package/dist/imageinsert/imageinsertui.d.ts +0 -90
- package/dist/imageinsert/imageinsertviaurlui.d.ts +0 -74
- package/dist/imageinsert/ui/imageinsertformview.d.ts +0 -60
- package/dist/imageinsert/ui/imageinserturlview.d.ts +0 -68
- package/dist/imageinsert.d.ts +0 -41
- package/dist/imageinsertviaurl.d.ts +0 -39
- package/dist/imageresize/imagecustomresizeui.d.ts +0 -69
- package/dist/imageresize/imageresizebuttons.d.ts +0 -72
- package/dist/imageresize/imageresizeediting.d.ts +0 -49
- package/dist/imageresize/imageresizehandles.d.ts +0 -39
- package/dist/imageresize/resizeimagecommand.d.ts +0 -46
- package/dist/imageresize/ui/imagecustomresizeformview.d.ts +0 -133
- package/dist/imageresize/utils/getselectedimageeditornodes.d.ts +0 -28
- package/dist/imageresize/utils/getselectedimagepossibleresizerange.d.ts +0 -28
- package/dist/imageresize/utils/getselectedimagewidthinunits.d.ts +0 -22
- package/dist/imageresize/utils/tryparsedimensionwithunit.d.ts +0 -41
- package/dist/imageresize.d.ts +0 -36
- package/dist/imagesizeattributes.d.ts +0 -42
- package/dist/imagestyle/converters.d.ts +0 -28
- package/dist/imagestyle/imagestylecommand.d.ts +0 -72
- package/dist/imagestyle/imagestyleediting.d.ts +0 -58
- package/dist/imagestyle/imagestyleui.d.ts +0 -64
- package/dist/imagestyle/utils.d.ts +0 -105
- package/dist/imagestyle.d.ts +0 -40
- package/dist/imagetextalternative/imagetextalternativecommand.d.ts +0 -38
- package/dist/imagetextalternative/imagetextalternativeediting.d.ts +0 -36
- package/dist/imagetextalternative/imagetextalternativeui.d.ts +0 -76
- package/dist/imagetextalternative/ui/textalternativeformview.d.ts +0 -94
- package/dist/imagetextalternative.d.ts +0 -37
- package/dist/imagetoolbar.d.ts +0 -43
- package/dist/imageupload/imageuploadediting.d.ts +0 -132
- package/dist/imageupload/imageuploadprogress.d.ts +0 -50
- package/dist/imageupload/imageuploadui.d.ts +0 -55
- package/dist/imageupload/uploadimagecommand.d.ts +0 -78
- package/dist/imageupload/utils.d.ts +0 -37
- package/dist/imageupload.d.ts +0 -40
- package/dist/imageutils.d.ts +0 -133
- package/dist/index.d.ts +0 -54
- package/dist/pictureediting.d.ts +0 -96
package/dist/imageconfig.d.ts
DELETED
|
@@ -1,716 +0,0 @@
|
|
|
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-licensing-options
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* @module image/imageconfig
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.
|
|
14
|
-
*
|
|
15
|
-
* ```ts
|
|
16
|
-
* ClassicEditor
|
|
17
|
-
* .create( editorElement, {
|
|
18
|
-
* image: ... // Image feature options.
|
|
19
|
-
* } )
|
|
20
|
-
* .then( ... )
|
|
21
|
-
* .catch( ... );
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
25
|
-
*/
|
|
26
|
-
export interface ImageConfig {
|
|
27
|
-
/**
|
|
28
|
-
* The image insert configuration.
|
|
29
|
-
*/
|
|
30
|
-
insert?: ImageInsertConfig;
|
|
31
|
-
/**
|
|
32
|
-
* The image resize options.
|
|
33
|
-
*
|
|
34
|
-
* Each option should have at least these two properties:
|
|
35
|
-
*
|
|
36
|
-
* * name: The name of the UI component registered in the global
|
|
37
|
-
* {@link module:ui/editorui/editorui~EditorUI#componentFactory component factory} of the editor,
|
|
38
|
-
* representing the button a user can click to change the size of an image,
|
|
39
|
-
* * value: An actual image width applied when a user clicks the mentioned button
|
|
40
|
-
* ({@link module:image/imageresize/resizeimagecommand~ResizeImageCommand} gets executed).
|
|
41
|
-
* The value property is combined with the
|
|
42
|
-
* {@link module:image/imageconfig~ImageConfig#resizeUnit `config.image.resizeUnit`} (`%` by default).
|
|
43
|
-
* For instance: `value: '50'` and `resizeUnit: '%'` will render as `'50%'` in the UI.
|
|
44
|
-
*
|
|
45
|
-
* **Resetting the image size**
|
|
46
|
-
*
|
|
47
|
-
* If you want to set an option that will reset image to its original size, you need to pass a `null` value
|
|
48
|
-
* to one of the options. The `:original` token is not mandatory, you can call it anything you wish, but it must reflect
|
|
49
|
-
* in the standalone buttons configuration for the image toolbar.
|
|
50
|
-
*
|
|
51
|
-
* ```ts
|
|
52
|
-
* ClassicEditor
|
|
53
|
-
* .create( editorElement, {
|
|
54
|
-
* image: {
|
|
55
|
-
* resizeUnit: "%",
|
|
56
|
-
* resizeOptions: [ {
|
|
57
|
-
* name: 'resizeImage:original',
|
|
58
|
-
* value: null
|
|
59
|
-
* },
|
|
60
|
-
* {
|
|
61
|
-
* name: 'resizeImage:50',
|
|
62
|
-
* value: '50'
|
|
63
|
-
* },
|
|
64
|
-
* {
|
|
65
|
-
* name: 'resizeImage:75',
|
|
66
|
-
* value: '75'
|
|
67
|
-
* } ]
|
|
68
|
-
* }
|
|
69
|
-
* } )
|
|
70
|
-
* .then( ... )
|
|
71
|
-
* .catch( ... );
|
|
72
|
-
* ```
|
|
73
|
-
*
|
|
74
|
-
* **Resizing images using a dropdown**
|
|
75
|
-
*
|
|
76
|
-
* With resize options defined, you can decide whether you want to display them as a dropdown or as standalone buttons.
|
|
77
|
-
* For the dropdown, you need to pass only the `resizeImage` token to the
|
|
78
|
-
{@link module:image/imageconfig~ImageConfig#toolbar `config.image.toolbar`}. The dropdown contains all defined options by default:
|
|
79
|
-
*
|
|
80
|
-
* ```ts
|
|
81
|
-
* ClassicEditor
|
|
82
|
-
* .create( editorElement, {
|
|
83
|
-
* image: {
|
|
84
|
-
* resizeUnit: "%",
|
|
85
|
-
* resizeOptions: [ {
|
|
86
|
-
* name: 'resizeImage:original',
|
|
87
|
-
* value: null
|
|
88
|
-
* },
|
|
89
|
-
* {
|
|
90
|
-
* name: 'resizeImage:50',
|
|
91
|
-
* value: '50'
|
|
92
|
-
* },
|
|
93
|
-
* {
|
|
94
|
-
* name: 'resizeImage:75',
|
|
95
|
-
* value: '75'
|
|
96
|
-
* } ],
|
|
97
|
-
* toolbar: [ 'resizeImage', ... ],
|
|
98
|
-
* }
|
|
99
|
-
* } )
|
|
100
|
-
* .then( ... )
|
|
101
|
-
* .catch( ... );
|
|
102
|
-
* ```
|
|
103
|
-
*
|
|
104
|
-
* **Resizing images using individual buttons**
|
|
105
|
-
*
|
|
106
|
-
* If you want to have separate buttons for {@link module:image/imageconfig~ImageResizeOption each option},
|
|
107
|
-
* pass their names to the {@link module:image/imageconfig~ImageConfig#toolbar `config.image.toolbar`} instead. Please keep in mind
|
|
108
|
-
* that this time **you must define the additional
|
|
109
|
-
* {@link module:image/imageconfig~ImageResizeOption `icon` property}**:
|
|
110
|
-
*
|
|
111
|
-
* ```ts
|
|
112
|
-
* ClassicEditor
|
|
113
|
-
* .create( editorElement, {
|
|
114
|
-
* image: {
|
|
115
|
-
* resizeUnit: "%",
|
|
116
|
-
* resizeOptions: [ {
|
|
117
|
-
* name: 'resizeImage:original',
|
|
118
|
-
* value: null,
|
|
119
|
-
* icon: 'original'
|
|
120
|
-
* },
|
|
121
|
-
* {
|
|
122
|
-
* name: 'resizeImage:25',
|
|
123
|
-
* value: '25',
|
|
124
|
-
* icon: 'small'
|
|
125
|
-
* },
|
|
126
|
-
* {
|
|
127
|
-
* name: 'resizeImage:50',
|
|
128
|
-
* value: '50',
|
|
129
|
-
* icon: 'medium'
|
|
130
|
-
* },
|
|
131
|
-
* {
|
|
132
|
-
* name: 'resizeImage:75',
|
|
133
|
-
* value: '75',
|
|
134
|
-
* icon: 'large'
|
|
135
|
-
* } ],
|
|
136
|
-
* toolbar: [ 'resizeImage:25', 'resizeImage:50', 'resizeImage:75', 'resizeImage:original', ... ],
|
|
137
|
-
* }
|
|
138
|
-
* } )
|
|
139
|
-
* .then( ... )
|
|
140
|
-
* .catch( ... );
|
|
141
|
-
* ```
|
|
142
|
-
*
|
|
143
|
-
* **Customizing resize button labels**
|
|
144
|
-
*
|
|
145
|
-
* You can set your own label for each resize button. To do that, add the `label` property like in the example below.
|
|
146
|
-
*
|
|
147
|
-
* * When using the **dropdown**, the labels are displayed on the list of all options when you open the dropdown.
|
|
148
|
-
* * When using **standalone buttons**, the labels will are displayed as tooltips when a user hovers over the button.
|
|
149
|
-
*
|
|
150
|
-
* ```ts
|
|
151
|
-
* ClassicEditor
|
|
152
|
-
* .create( editorElement, {
|
|
153
|
-
* image: {
|
|
154
|
-
* resizeUnit: "%",
|
|
155
|
-
* resizeOptions: [ {
|
|
156
|
-
* name: 'resizeImage:original',
|
|
157
|
-
* value: null,
|
|
158
|
-
* label: 'Original size'
|
|
159
|
-
* // Note: add the "icon" property if you're configuring a standalone button.
|
|
160
|
-
* },
|
|
161
|
-
* {
|
|
162
|
-
* name: 'resizeImage:50',
|
|
163
|
-
* value: '50',
|
|
164
|
-
* label: 'Medium size'
|
|
165
|
-
* // Note: add the "icon" property if you're configuring a standalone button.
|
|
166
|
-
* },
|
|
167
|
-
* {
|
|
168
|
-
* name: 'resizeImage:75',
|
|
169
|
-
* value: '75',
|
|
170
|
-
* label: 'Large size'
|
|
171
|
-
* // Note: add the "icon" property if you're configuring a standalone button.
|
|
172
|
-
* } ]
|
|
173
|
-
* }
|
|
174
|
-
* } )
|
|
175
|
-
* .then( ... )
|
|
176
|
-
* .catch( ... );
|
|
177
|
-
* ```
|
|
178
|
-
*
|
|
179
|
-
* **Default value**
|
|
180
|
-
*
|
|
181
|
-
* The following configuration is used by default:
|
|
182
|
-
*
|
|
183
|
-
* ```ts
|
|
184
|
-
* resizeOptions = [
|
|
185
|
-
* {
|
|
186
|
-
* name: 'resizeImage:original',
|
|
187
|
-
* value: null,
|
|
188
|
-
* icon: 'original'
|
|
189
|
-
* },
|
|
190
|
-
* {
|
|
191
|
-
* name: 'resizeImage:25',
|
|
192
|
-
* value: '25',
|
|
193
|
-
* icon: 'small'
|
|
194
|
-
* },
|
|
195
|
-
* {
|
|
196
|
-
* name: 'resizeImage:50',
|
|
197
|
-
* value: '50',
|
|
198
|
-
* icon: 'medium'
|
|
199
|
-
* },
|
|
200
|
-
* {
|
|
201
|
-
* name: 'resizeImage:75',
|
|
202
|
-
* value: '75',
|
|
203
|
-
* icon: 'large'
|
|
204
|
-
* }
|
|
205
|
-
* ];
|
|
206
|
-
* ```
|
|
207
|
-
*/
|
|
208
|
-
resizeOptions?: Array<ImageResizeOption>;
|
|
209
|
-
/**
|
|
210
|
-
* The available options are `'px'` or `'%'`.
|
|
211
|
-
*
|
|
212
|
-
* Determines the size unit applied to the resized image.
|
|
213
|
-
*
|
|
214
|
-
* ```ts
|
|
215
|
-
* ClassicEditor
|
|
216
|
-
* .create( editorElement, {
|
|
217
|
-
* image: {
|
|
218
|
-
* resizeUnit: 'px'
|
|
219
|
-
* }
|
|
220
|
-
* } )
|
|
221
|
-
* .then( ... )
|
|
222
|
-
* .catch( ... );
|
|
223
|
-
* ```
|
|
224
|
-
*
|
|
225
|
-
* This option is used by the {@link module:image/imageresize~ImageResize} feature.
|
|
226
|
-
*
|
|
227
|
-
* @default '%'
|
|
228
|
-
*/
|
|
229
|
-
resizeUnit?: 'px' | '%';
|
|
230
|
-
/**
|
|
231
|
-
* The {@link module:image/imagestyle `ImageStyle`} plugin requires a list of the
|
|
232
|
-
* {@link module:image/imageconfig~ImageStyleConfig#options image style options} to work properly.
|
|
233
|
-
* The default configuration is provided (listed below) and can be customized while creating the editor instance.
|
|
234
|
-
*
|
|
235
|
-
* # **Command**
|
|
236
|
-
*
|
|
237
|
-
* The {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand `imageStyleCommand`}
|
|
238
|
-
* is configured based on the defined options,
|
|
239
|
-
* so you can change the style of the selected image by executing the following command:
|
|
240
|
-
*
|
|
241
|
-
* ```ts
|
|
242
|
-
* editor.execute( 'imageStyle' { value: 'alignLeft' } );
|
|
243
|
-
* ```
|
|
244
|
-
*
|
|
245
|
-
* # **Buttons**
|
|
246
|
-
*
|
|
247
|
-
* All of the image style options provided in the configuration are registered
|
|
248
|
-
* in the {@link module:ui/componentfactory~ComponentFactory UI components factory} with the "imageStyle:" prefixes and can be used
|
|
249
|
-
* in the {@link module:image/imageconfig~ImageConfig#toolbar image toolbar configuration}. The buttons available by default depending
|
|
250
|
-
* on the loaded plugins are listed in the next section.
|
|
251
|
-
*
|
|
252
|
-
* Read more about styling images in the {@glink features/images/images-styles Image styles guide}.
|
|
253
|
-
*
|
|
254
|
-
* # **Default options and buttons**
|
|
255
|
-
*
|
|
256
|
-
* If the custom configuration is not provided, the default configuration will be used depending on the loaded
|
|
257
|
-
* image editing plugins.
|
|
258
|
-
*
|
|
259
|
-
* * If both {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} and
|
|
260
|
-
* {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugins are loaded
|
|
261
|
-
* (which is usually the default editor configuration), the following options will be available for the toolbar
|
|
262
|
-
* configuration. These options will be registered as the buttons with the "imageStyle:" prefixes.
|
|
263
|
-
*
|
|
264
|
-
* ```ts
|
|
265
|
-
* const imageDefaultConfig = {
|
|
266
|
-
* styles: {
|
|
267
|
-
* options: [
|
|
268
|
-
* 'inline', 'alignLeft', 'alignRight',
|
|
269
|
-
* 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
|
|
270
|
-
* 'block', 'side'
|
|
271
|
-
* ]
|
|
272
|
-
* }
|
|
273
|
-
* };
|
|
274
|
-
* ```
|
|
275
|
-
*
|
|
276
|
-
* * If only the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin is loaded,
|
|
277
|
-
* the following buttons (options) and groups will be available for the toolbar configuration.
|
|
278
|
-
* These options will be registered as the buttons with the "imageStyle:" prefixes.
|
|
279
|
-
*
|
|
280
|
-
* ```ts
|
|
281
|
-
* const imageDefaultConfig = {
|
|
282
|
-
* styles: {
|
|
283
|
-
* options: [ 'block', 'side' ]
|
|
284
|
-
* }
|
|
285
|
-
* };
|
|
286
|
-
* ```
|
|
287
|
-
*
|
|
288
|
-
* * If only the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin is loaded,
|
|
289
|
-
* the following buttons (options) and groups will available for the toolbar configuration.
|
|
290
|
-
* These options will be registered as the buttons with the "imageStyle:" prefixes.
|
|
291
|
-
*
|
|
292
|
-
* ```ts
|
|
293
|
-
* const imageDefaultConfig = {
|
|
294
|
-
* styles: {
|
|
295
|
-
* options: [ 'inline', 'alignLeft', 'alignRight' ]
|
|
296
|
-
* }
|
|
297
|
-
* };
|
|
298
|
-
* ```
|
|
299
|
-
*
|
|
300
|
-
* Read more about the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options}.
|
|
301
|
-
*
|
|
302
|
-
* # **Custom configuration**
|
|
303
|
-
*
|
|
304
|
-
* The image styles configuration can be customized in several ways:
|
|
305
|
-
*
|
|
306
|
-
* * Any of the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options}
|
|
307
|
-
* can be loaded by the reference to its name as follows:
|
|
308
|
-
*
|
|
309
|
-
* ```ts
|
|
310
|
-
* ClassicEditor
|
|
311
|
-
* .create( editorElement, {
|
|
312
|
-
* image: {
|
|
313
|
-
* styles: {
|
|
314
|
-
* options: [ 'alignLeft', 'alignRight' ]
|
|
315
|
-
* }
|
|
316
|
-
* }
|
|
317
|
-
* } );
|
|
318
|
-
* ```
|
|
319
|
-
*
|
|
320
|
-
* * Each of the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default image style options} can be customized,
|
|
321
|
-
* e.g. to change the `icon`, `title` or CSS `className` of the style. The feature also provides several
|
|
322
|
-
* {@link module:image/imagestyle/utils#DEFAULT_ICONS default icons} to choose from.
|
|
323
|
-
*
|
|
324
|
-
* ```ts
|
|
325
|
-
* import customIcon from 'custom-icon.svg';
|
|
326
|
-
*
|
|
327
|
-
* // ...
|
|
328
|
-
*
|
|
329
|
-
* ClassicEditor.create( editorElement, { image:
|
|
330
|
-
* styles: {
|
|
331
|
-
* options: {
|
|
332
|
-
* // This will only customize the icon of the "block" style.
|
|
333
|
-
* // Note: 'right' is one of default icons provided by the feature.
|
|
334
|
-
* {
|
|
335
|
-
* name: 'block',
|
|
336
|
-
* icon: 'right'
|
|
337
|
-
* },
|
|
338
|
-
*
|
|
339
|
-
* // This will customize the icon, title and CSS class of the default "side" style.
|
|
340
|
-
* {
|
|
341
|
-
* name: 'side',
|
|
342
|
-
* icon: customIcon,
|
|
343
|
-
* title: 'My side style',
|
|
344
|
-
* className: 'custom-side-image'
|
|
345
|
-
* }
|
|
346
|
-
* }
|
|
347
|
-
* }
|
|
348
|
-
* } );
|
|
349
|
-
* ```
|
|
350
|
-
*
|
|
351
|
-
* * If none of the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default image style options}
|
|
352
|
-
* works for the integration, it is possible to define independent custom styles, too.
|
|
353
|
-
*
|
|
354
|
-
* See the documentation about the image style {@link module:image/imageconfig~ImageStyleOptionDefinition options}
|
|
355
|
-
* to define the custom image style configuration properly.
|
|
356
|
-
*
|
|
357
|
-
* ```ts
|
|
358
|
-
* import redIcon from 'red-icon.svg';
|
|
359
|
-
* import blueIcon from 'blue-icon.svg';
|
|
360
|
-
*
|
|
361
|
-
* // ...
|
|
362
|
-
*
|
|
363
|
-
* ClassicEditor.create( editorElement, { image:
|
|
364
|
-
* styles: {
|
|
365
|
-
* // A list of completely custom styling options.
|
|
366
|
-
* options: [
|
|
367
|
-
* {
|
|
368
|
-
* name: 'regular',
|
|
369
|
-
* modelElements: [ 'imageBlock', 'imageInline' ],
|
|
370
|
-
* title: 'Regular image',
|
|
371
|
-
* icon: 'full',
|
|
372
|
-
* isDefault: true
|
|
373
|
-
* }, {
|
|
374
|
-
* name: 'blue',
|
|
375
|
-
* modelElements: [ 'imageInline' ],
|
|
376
|
-
* title: 'Blue image',
|
|
377
|
-
* icon: blueIcon,
|
|
378
|
-
* className: 'image-blue'
|
|
379
|
-
* }, {
|
|
380
|
-
* name: 'red',
|
|
381
|
-
* modelElements: [ 'imageBlock' ],
|
|
382
|
-
* title: 'Red image',
|
|
383
|
-
* icon: redIcon,
|
|
384
|
-
* className: 'image-red'
|
|
385
|
-
* }
|
|
386
|
-
* ]
|
|
387
|
-
* }
|
|
388
|
-
* } );
|
|
389
|
-
* ```
|
|
390
|
-
*/
|
|
391
|
-
styles?: ImageStyleConfig;
|
|
392
|
-
/**
|
|
393
|
-
* Items to be placed in the image toolbar.
|
|
394
|
-
* This option is used by the {@link module:image/imagetoolbar~ImageToolbar} feature.
|
|
395
|
-
*
|
|
396
|
-
* Assuming that you use the following features:
|
|
397
|
-
*
|
|
398
|
-
* * {@link module:image/imagestyle~ImageStyle} (with a default configuration),
|
|
399
|
-
* * {@link module:image/imagetextalternative~ImageTextAlternative},
|
|
400
|
-
* * {@link module:image/imagecaption~ImageCaption},
|
|
401
|
-
*
|
|
402
|
-
* the following toolbar items will be available in {@link module:ui/componentfactory~ComponentFactory}:
|
|
403
|
-
* * `'imageTextAlternative'`,
|
|
404
|
-
* * `'toggleImageCaption'`,
|
|
405
|
-
* * {@link module:image/imageconfig~ImageConfig#styles buttons provided by the `ImageStyle` plugin},
|
|
406
|
-
* * {@link module:image/imagestyle/utils#DEFAULT_DROPDOWN_DEFINITIONS drop-downs provided by the `ImageStyle` plugin},
|
|
407
|
-
*
|
|
408
|
-
* so you can configure the toolbar like this:
|
|
409
|
-
*
|
|
410
|
-
* ```ts
|
|
411
|
-
* const imageConfig = {
|
|
412
|
-
* toolbar: [
|
|
413
|
-
* 'imageStyle:inline', 'imageStyle:wrapText', 'imageStyle:breakText', '|',
|
|
414
|
-
* 'toggleImageCaption', 'imageTextAlternative'
|
|
415
|
-
* ]
|
|
416
|
-
* };
|
|
417
|
-
* ```
|
|
418
|
-
*
|
|
419
|
-
* Besides that, the `ImageStyle` plugin allows to define a
|
|
420
|
-
* {@link module:image/imageconfig~ImageStyleDropdownDefinition custom drop-down} while configuring the toolbar.
|
|
421
|
-
*
|
|
422
|
-
* The same items can also be used in the {@link module:core/editor/editorconfig~EditorConfig#toolbar main editor toolbar}.
|
|
423
|
-
*
|
|
424
|
-
* Read more about configuring toolbar in {@link module:core/editor/editorconfig~EditorConfig#toolbar}.
|
|
425
|
-
*/
|
|
426
|
-
toolbar?: Array<string | ImageStyleDropdownDefinition>;
|
|
427
|
-
/**
|
|
428
|
-
* The image upload configuration.
|
|
429
|
-
*/
|
|
430
|
-
upload?: ImageUploadConfig;
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* The configuration of the image insert dropdown panel view. Used by the image insert feature in the `@ckeditor/ckeditor5-image` package.
|
|
434
|
-
*
|
|
435
|
-
* ```ts
|
|
436
|
-
* ClassicEditor
|
|
437
|
-
* .create( editorElement, {
|
|
438
|
-
* image: {
|
|
439
|
-
* insert: {
|
|
440
|
-
* ... // settings for "insertImage" view goes here
|
|
441
|
-
* }
|
|
442
|
-
* }
|
|
443
|
-
* } )
|
|
444
|
-
* .then( ... )
|
|
445
|
-
* .catch( ... );
|
|
446
|
-
* ```
|
|
447
|
-
*
|
|
448
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
449
|
-
*/
|
|
450
|
-
export interface ImageInsertConfig {
|
|
451
|
-
/**
|
|
452
|
-
* The image insert panel view configuration contains a list of {@link module:image/imageinsert~ImageInsert} integrations.
|
|
453
|
-
*
|
|
454
|
-
* The option accepts string tokens.
|
|
455
|
-
* * for predefined integrations, we have 3 special strings: `upload`, `url`, and `assetManager`.
|
|
456
|
-
* * for custom integrations, each string should be a name of the integration registered by the
|
|
457
|
-
* {@link module:image/imageinsert/imageinsertui~ImageInsertUI#registerIntegration `ImageInsertUI#registerIntegration()`}.
|
|
458
|
-
*
|
|
459
|
-
* ```ts
|
|
460
|
-
* // Add `upload`, `assetManager` and `url` integrations.
|
|
461
|
-
* const imageInsertConfig = {
|
|
462
|
-
* insert: {
|
|
463
|
-
* integrations: [
|
|
464
|
-
* 'upload',
|
|
465
|
-
* 'assetManager',
|
|
466
|
-
* 'url'
|
|
467
|
-
* ]
|
|
468
|
-
* }
|
|
469
|
-
* };
|
|
470
|
-
* ```
|
|
471
|
-
*
|
|
472
|
-
* @default [ 'upload', 'assetManager', 'url' ]
|
|
473
|
-
*/
|
|
474
|
-
integrations?: Array<string>;
|
|
475
|
-
/**
|
|
476
|
-
* This option allows to override the image type used by the {@link module:image/image/insertimagecommand~InsertImageCommand}
|
|
477
|
-
* when the user inserts new images into the editor content. By default, all images inserted into the editor will be block
|
|
478
|
-
* if {@link module:image/imageblock~ImageBlock} is loaded. To let the editor decide the image type, choose `'auto'`.
|
|
479
|
-
*
|
|
480
|
-
* Available options are:
|
|
481
|
-
*
|
|
482
|
-
* * `'block'` – all images inserted into the editor will be block (requires the {@link module:image/imageblock~ImageBlock} plugin),
|
|
483
|
-
* * `'inline'` – all images inserted into the editor will be inline (requires the {@link module:image/imageinline~ImageInline} plugin),
|
|
484
|
-
* * `'auto'` – the editor will choose the optimal image type based on the context of the insertion and availability of plugins.
|
|
485
|
-
*
|
|
486
|
-
* @default 'block'
|
|
487
|
-
*/
|
|
488
|
-
type?: 'inline' | 'block' | 'auto';
|
|
489
|
-
}
|
|
490
|
-
/**
|
|
491
|
-
* The image resize option used in the {@link module:image/imageconfig~ImageConfig#resizeOptions image resize configuration}.
|
|
492
|
-
*/
|
|
493
|
-
export interface ImageResizeOption {
|
|
494
|
-
/**
|
|
495
|
-
* The name of the UI component that changes the image size.
|
|
496
|
-
* * If you configure the feature using individual resize buttons, you can refer to this name in the
|
|
497
|
-
* {@link module:image/imageconfig~ImageConfig#toolbar image toolbar configuration}.
|
|
498
|
-
* * If you configure the feature using the resize dropdown, this name will be used for a list item in the dropdown.
|
|
499
|
-
*/
|
|
500
|
-
name: string;
|
|
501
|
-
/**
|
|
502
|
-
*
|
|
503
|
-
* The value of the resize option without the unit
|
|
504
|
-
* ({@link module:image/imageconfig~ImageConfig#resizeUnit configured separately}). `null` resets an image to its original size.
|
|
505
|
-
*/
|
|
506
|
-
value: string | null;
|
|
507
|
-
/**
|
|
508
|
-
* An icon used by an individual resize button (see the `name` property to learn more).
|
|
509
|
-
* Available icons are: `'small'`, `'medium'`, `'large'`, `'original'`.
|
|
510
|
-
*/
|
|
511
|
-
icon?: string;
|
|
512
|
-
/**
|
|
513
|
-
* An option label displayed in the dropdown or, if the feature is configured using
|
|
514
|
-
* individual buttons, a {@link module:ui/button/buttonview~ButtonView#tooltip} and an ARIA attribute of a button.
|
|
515
|
-
* If not specified, the label is generated automatically based on the `value` option and the
|
|
516
|
-
* {@link module:image/imageconfig~ImageConfig#resizeUnit `config.image.resizeUnit`}.
|
|
517
|
-
*/
|
|
518
|
-
label?: string;
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* # **The image style custom drop-down definition descriptor**
|
|
522
|
-
*
|
|
523
|
-
* This definition can be implemented in the {@link module:image/imageconfig~ImageConfig#toolbar image toolbar configuration}
|
|
524
|
-
* to define a completely custom drop-down in the image toolbar.
|
|
525
|
-
*
|
|
526
|
-
* ```ts
|
|
527
|
-
* ClassicEditor.create( editorElement, {
|
|
528
|
-
* image: { toolbar: [
|
|
529
|
-
* // One of the predefined drop-downs
|
|
530
|
-
* 'imageStyle:wrapText',
|
|
531
|
-
* // Custom drop-down
|
|
532
|
-
* {
|
|
533
|
-
* name: 'imageStyle:customDropdown',
|
|
534
|
-
* title: Custom drop-down title,
|
|
535
|
-
* items: [ 'imageStyle:alignLeft', 'imageStyle:alignRight' ],
|
|
536
|
-
* defaultItem: 'imageStyle:alignLeft'
|
|
537
|
-
* }
|
|
538
|
-
* ] }
|
|
539
|
-
* } );
|
|
540
|
-
* ```
|
|
541
|
-
*
|
|
542
|
-
* **Note:** At the moment it is possible to populate the custom drop-down with only the buttons registered by the `ImageStyle` plugin.
|
|
543
|
-
*
|
|
544
|
-
* The defined drop-down will be registered
|
|
545
|
-
* as the {@link module:ui/dropdown/dropdownview~DropdownView}
|
|
546
|
-
* with the {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} under the provided name in the
|
|
547
|
-
* {@link module:ui/componentfactory~ComponentFactory}
|
|
548
|
-
*/
|
|
549
|
-
export interface ImageStyleDropdownDefinition {
|
|
550
|
-
/**
|
|
551
|
-
* The unique name of the drop-down. It is recommended to precede it with the "imageStyle:" prefix
|
|
552
|
-
* to avoid collision with the components' names registered by other plugins.
|
|
553
|
-
*/
|
|
554
|
-
name: string;
|
|
555
|
-
/**
|
|
556
|
-
* The drop-down's title. It will be used as the split button label along with the title of the default item
|
|
557
|
-
* in the following manner: "Custom drop-down title: Default item title".
|
|
558
|
-
*
|
|
559
|
-
* Setting `title` to one of
|
|
560
|
-
* {@link module:image/imagestyle/imagestyleui~ImageStyleUI#localizedDefaultStylesTitles}
|
|
561
|
-
* will automatically translate it to the language of the editor.
|
|
562
|
-
*/
|
|
563
|
-
title?: string;
|
|
564
|
-
/**
|
|
565
|
-
* The list of the names of the buttons that will be placed in the drop-down's toolbar.
|
|
566
|
-
* Each of the buttons has to be one of the {@link module:image/imageconfig~ImageConfig#styles default image style buttons}
|
|
567
|
-
* or to be defined as the {@link module:image/imageconfig~ImageStyleOptionDefinition image styling option}.
|
|
568
|
-
*/
|
|
569
|
-
items: Array<string>;
|
|
570
|
-
/**
|
|
571
|
-
* defaultItem The name of one of the buttons from the items list,
|
|
572
|
-
* which will be used as a default button for the drop-down's split button.
|
|
573
|
-
*/
|
|
574
|
-
defaultItem: string;
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* The configuration for the {@link module:image/imagestyle~ImageStyle} plugin that should be provided
|
|
578
|
-
* while creating the editor instance.
|
|
579
|
-
*
|
|
580
|
-
* A detailed information about the default configuration and customization can be found in
|
|
581
|
-
* {@link module:image/imageconfig~ImageConfig#styles `ImageConfig#styles`}.
|
|
582
|
-
*/
|
|
583
|
-
export interface ImageStyleConfig {
|
|
584
|
-
/**
|
|
585
|
-
* A list of the image style options.
|
|
586
|
-
*/
|
|
587
|
-
options?: Array<string | ImageStyleOptionDefinition>;
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* The image styling option definition descriptor.
|
|
591
|
-
*
|
|
592
|
-
* This definition should be implemented in the `Image` plugin {@link module:image/imageconfig~ImageConfig#styles configuration} for:
|
|
593
|
-
*
|
|
594
|
-
* * customizing one of the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options} by providing the proper name
|
|
595
|
-
* of the default style and the properties that should be overridden,
|
|
596
|
-
* * or defining a completely custom styling option by providing a custom name and implementing the following properties.
|
|
597
|
-
*
|
|
598
|
-
* ```ts
|
|
599
|
-
* import fullSizeIcon from 'path/to/icon.svg';
|
|
600
|
-
*
|
|
601
|
-
* const imageStyleOptionDefinition = {
|
|
602
|
-
* name: 'fullSize',
|
|
603
|
-
* icon: fullSizeIcon,
|
|
604
|
-
* title: 'Full size image',
|
|
605
|
-
* className: 'image-full-size',
|
|
606
|
-
* modelElements: [ 'imageBlock', 'imageInline' ]
|
|
607
|
-
* }
|
|
608
|
-
* ```
|
|
609
|
-
*
|
|
610
|
-
* The styling option will be registered as the button under the name `'imageStyle:{name}'` in the
|
|
611
|
-
* {@link module:ui/componentfactory~ComponentFactory UI components factory} (this functionality is provided by the
|
|
612
|
-
* {@link module:image/imagestyle/imagestyleui~ImageStyleUI} plugin).
|
|
613
|
-
*/
|
|
614
|
-
export interface ImageStyleOptionDefinition {
|
|
615
|
-
/**
|
|
616
|
-
* The unique name of the styling option. It will be used to:
|
|
617
|
-
*
|
|
618
|
-
* * refer to one of the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options} or define the custom style,
|
|
619
|
-
* * store the chosen style in the model by setting the `imageStyle` attribute of the model image element,
|
|
620
|
-
* * as a value of the {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute `imageStyle` command},
|
|
621
|
-
* * when registering a button for the style in the following manner: (`'imageStyle:{name}'`).
|
|
622
|
-
*/
|
|
623
|
-
name: string;
|
|
624
|
-
/**
|
|
625
|
-
* When set, the style will be used as the default one for the model elements
|
|
626
|
-
* listed in the `modelElements` property. A default style does not apply any CSS class to the view element.
|
|
627
|
-
*
|
|
628
|
-
* If this property is not defined, its value is inherited
|
|
629
|
-
* from the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options} addressed in the name property.
|
|
630
|
-
*/
|
|
631
|
-
isDefault?: boolean;
|
|
632
|
-
/**
|
|
633
|
-
* One of the following to be used when creating the styles's button:
|
|
634
|
-
*
|
|
635
|
-
* * an SVG icon source (as an XML string),
|
|
636
|
-
* * one of the keys in {@link module:image/imagestyle/utils#DEFAULT_ICONS} to use one of default icons provided by the plugin.
|
|
637
|
-
*
|
|
638
|
-
* If this property is not defined, its value is inherited
|
|
639
|
-
* from the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options} addressed in the name property.
|
|
640
|
-
*/
|
|
641
|
-
icon: string;
|
|
642
|
-
/**
|
|
643
|
-
* The styles's title. Setting `title` to one of
|
|
644
|
-
* {@link module:image/imagestyle/imagestyleui~ImageStyleUI#localizedDefaultStylesTitles}
|
|
645
|
-
* will automatically translate it to the language of the editor.
|
|
646
|
-
*
|
|
647
|
-
* If this property is not defined, its value is inherited
|
|
648
|
-
* from the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options} addressed in the name property.
|
|
649
|
-
*/
|
|
650
|
-
title: string;
|
|
651
|
-
/**
|
|
652
|
-
* The CSS class used to represent the style in the view.
|
|
653
|
-
* It should be used only for the non-default styles.
|
|
654
|
-
*
|
|
655
|
-
* If this property is not defined, its value is inherited
|
|
656
|
-
* from the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options} addressed in the name property.
|
|
657
|
-
*/
|
|
658
|
-
className?: string;
|
|
659
|
-
/**
|
|
660
|
-
* The list of the names of the model elements that are supported by the style.
|
|
661
|
-
* The possible values are:
|
|
662
|
-
* * `[ 'imageBlock' ]` if the style can be applied to the image type introduced by the
|
|
663
|
-
* {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin,
|
|
664
|
-
* * `[ 'imageInline' ]` if the style can be applied to the image type introduced by the
|
|
665
|
-
* {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin,
|
|
666
|
-
* * `[ 'imageInline', 'imageBlock' ]` if the style can be applied to both image types introduced by the plugins mentioned above.
|
|
667
|
-
*
|
|
668
|
-
* This property determines which model element names work with the style. If the model element name of the currently selected
|
|
669
|
-
* image is different, upon executing the
|
|
670
|
-
* {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute `imageStyle`} command the image type (model element name)
|
|
671
|
-
* will automatically change.
|
|
672
|
-
*
|
|
673
|
-
* If this property is not defined, its value is inherited
|
|
674
|
-
* from the {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default styling options} addressed in the name property.
|
|
675
|
-
*/
|
|
676
|
-
modelElements: Array<string>;
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* The configuration of the image upload feature. Used by the image upload feature in the `@ckeditor/ckeditor5-image` package.
|
|
680
|
-
*
|
|
681
|
-
* ```ts
|
|
682
|
-
* ClassicEditor
|
|
683
|
-
* .create( editorElement, {
|
|
684
|
-
* image: {
|
|
685
|
-
* upload: ... // Image upload feature options.
|
|
686
|
-
* }
|
|
687
|
-
* } )
|
|
688
|
-
* .then( ... )
|
|
689
|
-
* .catch( ... );
|
|
690
|
-
* ```
|
|
691
|
-
*
|
|
692
|
-
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
693
|
-
*/
|
|
694
|
-
export interface ImageUploadConfig {
|
|
695
|
-
/**
|
|
696
|
-
* The list of accepted image types.
|
|
697
|
-
*
|
|
698
|
-
* The accepted types of images can be customized to allow only certain types of images:
|
|
699
|
-
*
|
|
700
|
-
* ```ts
|
|
701
|
-
* // Allow only JPEG and PNG images:
|
|
702
|
-
* const imageUploadConfig = {
|
|
703
|
-
* types: [ 'png', 'jpeg' ]
|
|
704
|
-
* };
|
|
705
|
-
* ```
|
|
706
|
-
*
|
|
707
|
-
* The type string should match [one of the sub-types](https://www.iana.org/assignments/media-types/media-types.xhtml#image)
|
|
708
|
-
* of the image MIME type. For example, for the `image/jpeg` MIME type, add `'jpeg'` to your image upload configuration.
|
|
709
|
-
*
|
|
710
|
-
* **Note:** This setting only restricts some image types to be selected and uploaded through the CKEditor UI and commands. Image type
|
|
711
|
-
* recognition and filtering should also be implemented on the server which accepts image uploads.
|
|
712
|
-
*
|
|
713
|
-
* @default [ 'jpeg', 'png', 'gif', 'bmp', 'webp', 'tiff' ]
|
|
714
|
-
*/
|
|
715
|
-
types: Array<string>;
|
|
716
|
-
}
|