@ckeditor/ckeditor5-image 0.0.0-internal-20241017.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +21 -0
- package/README.md +26 -0
- package/build/image.js +5 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/ast.js +1 -0
- package/build/translations/az.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/en-gb.js +1 -0
- package/build/translations/eo.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/eu.js +1 -0
- package/build/translations/fa.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/km.js +1 -0
- package/build/translations/kn.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/ku.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nb.js +1 -0
- package/build/translations/ne.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/si.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sq.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/uz.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +270 -0
- package/dist/augmentation.d.ts +61 -0
- package/dist/autoimage.d.ts +60 -0
- package/dist/image/converters.d.ts +70 -0
- package/dist/image/imageblockediting.d.ts +67 -0
- package/dist/image/imageediting.d.ts +38 -0
- package/dist/image/imageinlineediting.d.ts +68 -0
- package/dist/image/imageloadobserver.d.ts +52 -0
- package/dist/image/imageplaceholder.d.ts +47 -0
- package/dist/image/imagetypecommand.d.ts +48 -0
- package/dist/image/insertimagecommand.d.ts +72 -0
- package/dist/image/replaceimagesourcecommand.d.ts +55 -0
- package/dist/image/ui/utils.d.ts +29 -0
- package/dist/image/utils.d.ts +68 -0
- package/dist/image.d.ts +42 -0
- package/dist/imageblock.d.ts +42 -0
- package/dist/imagecaption/imagecaptionediting.d.ts +97 -0
- package/dist/imagecaption/imagecaptionui.d.ts +34 -0
- package/dist/imagecaption/imagecaptionutils.d.ts +46 -0
- package/dist/imagecaption/toggleimagecaptioncommand.d.ts +70 -0
- package/dist/imagecaption.d.ts +34 -0
- package/dist/imageconfig.d.ts +716 -0
- package/dist/imageinline.d.ts +42 -0
- package/dist/imageinsert/imageinsertui.d.ts +90 -0
- package/dist/imageinsert/imageinsertviaurlui.d.ts +74 -0
- package/dist/imageinsert/ui/imageinsertformview.d.ts +60 -0
- package/dist/imageinsert/ui/imageinserturlview.d.ts +68 -0
- package/dist/imageinsert.d.ts +41 -0
- package/dist/imageinsertviaurl.d.ts +39 -0
- package/dist/imageresize/imagecustomresizeui.d.ts +69 -0
- package/dist/imageresize/imageresizebuttons.d.ts +72 -0
- package/dist/imageresize/imageresizeediting.d.ts +49 -0
- package/dist/imageresize/imageresizehandles.d.ts +39 -0
- package/dist/imageresize/resizeimagecommand.d.ts +46 -0
- package/dist/imageresize/ui/imagecustomresizeformview.d.ts +133 -0
- package/dist/imageresize/utils/getselectedimageeditornodes.d.ts +28 -0
- package/dist/imageresize/utils/getselectedimagepossibleresizerange.d.ts +28 -0
- package/dist/imageresize/utils/getselectedimagewidthinunits.d.ts +22 -0
- package/dist/imageresize/utils/tryparsedimensionwithunit.d.ts +41 -0
- package/dist/imageresize.d.ts +36 -0
- package/dist/imagesizeattributes.d.ts +42 -0
- package/dist/imagestyle/converters.d.ts +28 -0
- package/dist/imagestyle/imagestylecommand.d.ts +72 -0
- package/dist/imagestyle/imagestyleediting.d.ts +58 -0
- package/dist/imagestyle/imagestyleui.d.ts +64 -0
- package/dist/imagestyle/utils.d.ts +105 -0
- package/dist/imagestyle.d.ts +40 -0
- package/dist/imagetextalternative/imagetextalternativecommand.d.ts +38 -0
- package/dist/imagetextalternative/imagetextalternativeediting.d.ts +36 -0
- package/dist/imagetextalternative/imagetextalternativeui.d.ts +76 -0
- package/dist/imagetextalternative/ui/textalternativeformview.d.ts +94 -0
- package/dist/imagetextalternative.d.ts +37 -0
- package/dist/imagetoolbar.d.ts +43 -0
- package/dist/imageupload/imageuploadediting.d.ts +119 -0
- package/dist/imageupload/imageuploadprogress.d.ts +50 -0
- package/dist/imageupload/imageuploadui.d.ts +55 -0
- package/dist/imageupload/uploadimagecommand.d.ts +78 -0
- package/dist/imageupload/utils.d.ts +37 -0
- package/dist/imageupload.d.ts +40 -0
- package/dist/imageutils.d.ts +133 -0
- package/dist/index-content.css +150 -0
- package/dist/index-editor.css +248 -0
- package/dist/index.css +579 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +6383 -0
- package/dist/index.js.map +1 -0
- package/dist/pictureediting.d.ts +96 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/ast.d.ts +8 -0
- package/dist/translations/ast.js +5 -0
- package/dist/translations/ast.umd.js +11 -0
- package/dist/translations/az.d.ts +8 -0
- package/dist/translations/az.js +5 -0
- package/dist/translations/az.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +5 -0
- package/dist/translations/bs.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +5 -0
- package/dist/translations/de-ch.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en-gb.d.ts +8 -0
- package/dist/translations/en-gb.js +5 -0
- package/dist/translations/en-gb.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/eo.d.ts +8 -0
- package/dist/translations/eo.js +5 -0
- package/dist/translations/eo.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/eu.d.ts +8 -0
- package/dist/translations/eu.js +5 -0
- package/dist/translations/eu.umd.js +11 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +5 -0
- package/dist/translations/fa.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +5 -0
- package/dist/translations/jv.umd.js +11 -0
- package/dist/translations/km.d.ts +8 -0
- package/dist/translations/km.js +5 -0
- package/dist/translations/km.umd.js +11 -0
- package/dist/translations/kn.d.ts +8 -0
- package/dist/translations/kn.js +5 -0
- package/dist/translations/kn.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/ku.d.ts +8 -0
- package/dist/translations/ku.js +5 -0
- package/dist/translations/ku.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nb.d.ts +8 -0
- package/dist/translations/nb.js +5 -0
- package/dist/translations/nb.umd.js +11 -0
- package/dist/translations/ne.d.ts +8 -0
- package/dist/translations/ne.js +5 -0
- package/dist/translations/ne.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/si.d.ts +8 -0
- package/dist/translations/si.js +5 -0
- package/dist/translations/si.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sq.d.ts +8 -0
- package/dist/translations/sq.js +5 -0
- package/dist/translations/sq.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/ti.d.ts +8 -0
- package/dist/translations/ti.js +5 -0
- package/dist/translations/ti.umd.js +11 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +5 -0
- package/dist/translations/tk.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +5 -0
- package/dist/translations/uz.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/lang/contexts.json +46 -0
- package/lang/translations/ar.po +194 -0
- package/lang/translations/ast.po +194 -0
- package/lang/translations/az.po +194 -0
- package/lang/translations/bg.po +194 -0
- package/lang/translations/bn.po +194 -0
- package/lang/translations/bs.po +194 -0
- package/lang/translations/ca.po +194 -0
- package/lang/translations/cs.po +194 -0
- package/lang/translations/da.po +194 -0
- package/lang/translations/de-ch.po +194 -0
- package/lang/translations/de.po +194 -0
- package/lang/translations/el.po +194 -0
- package/lang/translations/en-au.po +194 -0
- package/lang/translations/en-gb.po +194 -0
- package/lang/translations/en.po +194 -0
- package/lang/translations/eo.po +194 -0
- package/lang/translations/es.po +194 -0
- package/lang/translations/et.po +194 -0
- package/lang/translations/eu.po +194 -0
- package/lang/translations/fa.po +194 -0
- package/lang/translations/fi.po +194 -0
- package/lang/translations/fr.po +194 -0
- package/lang/translations/gl.po +194 -0
- package/lang/translations/he.po +194 -0
- package/lang/translations/hi.po +194 -0
- package/lang/translations/hr.po +194 -0
- package/lang/translations/hu.po +194 -0
- package/lang/translations/id.po +194 -0
- package/lang/translations/it.po +194 -0
- package/lang/translations/ja.po +194 -0
- package/lang/translations/jv.po +194 -0
- package/lang/translations/km.po +194 -0
- package/lang/translations/kn.po +194 -0
- package/lang/translations/ko.po +194 -0
- package/lang/translations/ku.po +194 -0
- package/lang/translations/lt.po +194 -0
- package/lang/translations/lv.po +194 -0
- package/lang/translations/ms.po +194 -0
- package/lang/translations/nb.po +194 -0
- package/lang/translations/ne.po +194 -0
- package/lang/translations/nl.po +194 -0
- package/lang/translations/no.po +194 -0
- package/lang/translations/pl.po +194 -0
- package/lang/translations/pt-br.po +194 -0
- package/lang/translations/pt.po +194 -0
- package/lang/translations/ro.po +194 -0
- package/lang/translations/ru.po +194 -0
- package/lang/translations/si.po +194 -0
- package/lang/translations/sk.po +194 -0
- package/lang/translations/sq.po +194 -0
- package/lang/translations/sr-latn.po +194 -0
- package/lang/translations/sr.po +194 -0
- package/lang/translations/sv.po +194 -0
- package/lang/translations/th.po +194 -0
- package/lang/translations/ti.po +194 -0
- package/lang/translations/tk.po +194 -0
- package/lang/translations/tr.po +194 -0
- package/lang/translations/ug.po +194 -0
- package/lang/translations/uk.po +194 -0
- package/lang/translations/ur.po +194 -0
- package/lang/translations/uz.po +194 -0
- package/lang/translations/vi.po +194 -0
- package/lang/translations/zh-cn.po +194 -0
- package/lang/translations/zh.po +194 -0
- package/package.json +48 -0
- package/src/augmentation.d.ts +57 -0
- package/src/augmentation.js +5 -0
- package/src/autoimage.d.ts +56 -0
- package/src/autoimage.js +138 -0
- package/src/image/converters.d.ts +66 -0
- package/src/image/converters.js +232 -0
- package/src/image/imageblockediting.d.ts +63 -0
- package/src/image/imageblockediting.js +159 -0
- package/src/image/imageediting.d.ts +34 -0
- package/src/image/imageediting.js +69 -0
- package/src/image/imageinlineediting.d.ts +64 -0
- package/src/image/imageinlineediting.js +178 -0
- package/src/image/imageloadobserver.d.ts +48 -0
- package/src/image/imageloadobserver.js +52 -0
- package/src/image/imageplaceholder.d.ts +43 -0
- package/src/image/imageplaceholder.js +119 -0
- package/src/image/imagetypecommand.d.ts +44 -0
- package/src/image/imagetypecommand.js +80 -0
- package/src/image/insertimagecommand.d.ts +68 -0
- package/src/image/insertimagecommand.js +121 -0
- package/src/image/replaceimagesourcecommand.d.ts +51 -0
- package/src/image/replaceimagesourcecommand.js +75 -0
- package/src/image/ui/utils.d.ts +25 -0
- package/src/image/ui/utils.js +44 -0
- package/src/image/utils.d.ts +64 -0
- package/src/image/utils.js +121 -0
- package/src/image.d.ts +38 -0
- package/src/image.js +44 -0
- package/src/imageblock.d.ts +38 -0
- package/src/imageblock.js +44 -0
- package/src/imagecaption/imagecaptionediting.d.ts +93 -0
- package/src/imagecaption/imagecaptionediting.js +231 -0
- package/src/imagecaption/imagecaptionui.d.ts +30 -0
- package/src/imagecaption/imagecaptionui.js +67 -0
- package/src/imagecaption/imagecaptionutils.d.ts +42 -0
- package/src/imagecaption/imagecaptionutils.js +68 -0
- package/src/imagecaption/toggleimagecaptioncommand.d.ts +66 -0
- package/src/imagecaption/toggleimagecaptioncommand.js +138 -0
- package/src/imagecaption.d.ts +30 -0
- package/src/imagecaption.js +36 -0
- package/src/imageconfig.d.ts +712 -0
- package/src/imageconfig.js +5 -0
- package/src/imageinline.d.ts +38 -0
- package/src/imageinline.js +44 -0
- package/src/imageinsert/imageinsertui.d.ts +86 -0
- package/src/imageinsert/imageinsertui.js +217 -0
- package/src/imageinsert/imageinsertviaurlui.d.ts +70 -0
- package/src/imageinsert/imageinsertviaurlui.js +174 -0
- package/src/imageinsert/ui/imageinsertformview.d.ts +56 -0
- package/src/imageinsert/ui/imageinsertformview.js +95 -0
- package/src/imageinsert/ui/imageinserturlview.d.ts +64 -0
- package/src/imageinsert/ui/imageinserturlview.js +88 -0
- package/src/imageinsert.d.ts +37 -0
- package/src/imageinsert.js +43 -0
- package/src/imageinsertviaurl.d.ts +35 -0
- package/src/imageinsertviaurl.js +41 -0
- package/src/imageresize/imagecustomresizeui.d.ts +65 -0
- package/src/imageresize/imagecustomresizeui.js +174 -0
- package/src/imageresize/imageresizebuttons.d.ts +68 -0
- package/src/imageresize/imageresizebuttons.js +295 -0
- package/src/imageresize/imageresizeediting.d.ts +45 -0
- package/src/imageresize/imageresizeediting.js +183 -0
- package/src/imageresize/imageresizehandles.d.ts +35 -0
- package/src/imageresize/imageresizehandles.js +118 -0
- package/src/imageresize/resizeimagecommand.d.ts +42 -0
- package/src/imageresize/resizeimagecommand.js +63 -0
- package/src/imageresize/ui/imagecustomresizeformview.d.ts +129 -0
- package/src/imageresize/ui/imagecustomresizeformview.js +186 -0
- package/src/imageresize/utils/getselectedimageeditornodes.d.ts +24 -0
- package/src/imageresize/utils/getselectedimageeditornodes.js +24 -0
- package/src/imageresize/utils/getselectedimagepossibleresizerange.d.ts +24 -0
- package/src/imageresize/utils/getselectedimagepossibleresizerange.js +32 -0
- package/src/imageresize/utils/getselectedimagewidthinunits.d.ts +18 -0
- package/src/imageresize/utils/getselectedimagewidthinunits.js +41 -0
- package/src/imageresize/utils/tryparsedimensionwithunit.d.ts +37 -0
- package/src/imageresize/utils/tryparsedimensionwithunit.js +56 -0
- package/src/imageresize.d.ts +32 -0
- package/src/imageresize.js +38 -0
- package/src/imagesizeattributes.d.ts +38 -0
- package/src/imagesizeattributes.js +148 -0
- package/src/imagestyle/converters.d.ts +24 -0
- package/src/imagestyle/converters.js +79 -0
- package/src/imagestyle/imagestylecommand.d.ts +68 -0
- package/src/imagestyle/imagestylecommand.js +107 -0
- package/src/imagestyle/imagestyleediting.d.ts +54 -0
- package/src/imagestyle/imagestyleediting.js +114 -0
- package/src/imagestyle/imagestyleui.d.ts +60 -0
- package/src/imagestyle/imagestyleui.js +198 -0
- package/src/imagestyle/utils.d.ts +101 -0
- package/src/imagestyle/utils.js +328 -0
- package/src/imagestyle.d.ts +36 -0
- package/src/imagestyle.js +42 -0
- package/src/imagetextalternative/imagetextalternativecommand.d.ts +34 -0
- package/src/imagetextalternative/imagetextalternativecommand.js +44 -0
- package/src/imagetextalternative/imagetextalternativeediting.d.ts +32 -0
- package/src/imagetextalternative/imagetextalternativeediting.js +41 -0
- package/src/imagetextalternative/imagetextalternativeui.d.ts +72 -0
- package/src/imagetextalternative/imagetextalternativeui.js +179 -0
- package/src/imagetextalternative/ui/textalternativeformview.d.ts +90 -0
- package/src/imagetextalternative/ui/textalternativeformview.js +121 -0
- package/src/imagetextalternative.d.ts +33 -0
- package/src/imagetextalternative.js +39 -0
- package/src/imagetoolbar.d.ts +39 -0
- package/src/imagetoolbar.js +63 -0
- package/src/imageupload/imageuploadediting.d.ts +115 -0
- package/src/imageupload/imageuploadediting.js +361 -0
- package/src/imageupload/imageuploadprogress.d.ts +46 -0
- package/src/imageupload/imageuploadprogress.js +217 -0
- package/src/imageupload/imageuploadui.d.ts +51 -0
- package/src/imageupload/imageuploadui.js +134 -0
- package/src/imageupload/uploadimagecommand.d.ts +74 -0
- package/src/imageupload/uploadimagecommand.js +110 -0
- package/src/imageupload/utils.d.ts +33 -0
- package/src/imageupload/utils.js +112 -0
- package/src/imageupload.d.ts +36 -0
- package/src/imageupload.js +42 -0
- package/src/imageutils.d.ts +129 -0
- package/src/imageutils.js +312 -0
- package/src/index.d.ts +50 -0
- package/src/index.js +41 -0
- package/src/pictureediting.d.ts +92 -0
- package/src/pictureediting.js +136 -0
- package/theme/image.css +143 -0
- package/theme/imagecaption.css +51 -0
- package/theme/imagecustomresizeform.css +33 -0
- package/theme/imageinsert.css +14 -0
- package/theme/imageplaceholder.css +10 -0
- package/theme/imageresize.css +53 -0
- package/theme/imagestyle.css +120 -0
- package/theme/imageuploadicon.css +23 -0
- package/theme/imageuploadloader.css +18 -0
- package/theme/imageuploadprogress.css +19 -0
- package/theme/textalternativeform.css +32 -0
package/src/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
* @module image
|
|
7
|
+
*/
|
|
8
|
+
export { default as AutoImage } from './autoimage.js';
|
|
9
|
+
export { default as Image } from './image.js';
|
|
10
|
+
export { default as ImageEditing } from './image/imageediting.js';
|
|
11
|
+
export { default as ImageCaptionUtils } from './imagecaption/imagecaptionutils.js';
|
|
12
|
+
export { default as ImageCaption } from './imagecaption.js';
|
|
13
|
+
export { default as ImageCaptionEditing } from './imagecaption/imagecaptionediting.js';
|
|
14
|
+
export { default as ImageInsert } from './imageinsert.js';
|
|
15
|
+
export { default as ImageInsertUI } from './imageinsert/imageinsertui.js';
|
|
16
|
+
export { default as ImageResize } from './imageresize.js';
|
|
17
|
+
export { default as ImageResizeButtons } from './imageresize/imageresizebuttons.js';
|
|
18
|
+
export { default as ImageResizeEditing } from './imageresize/imageresizeediting.js';
|
|
19
|
+
export { default as ImageResizeHandles } from './imageresize/imageresizehandles.js';
|
|
20
|
+
export { default as ImageCustomResizeUI } from './imageresize/imagecustomresizeui.js';
|
|
21
|
+
export { default as ImageSizeAttributes } from './imagesizeattributes.js';
|
|
22
|
+
export { default as ImageStyle } from './imagestyle.js';
|
|
23
|
+
export { default as ImageStyleEditing } from './imagestyle/imagestyleediting.js';
|
|
24
|
+
export { default as ImageStyleUI } from './imagestyle/imagestyleui.js';
|
|
25
|
+
export { default as ImageTextAlternative } from './imagetextalternative.js';
|
|
26
|
+
export { default as ImageTextAlternativeEditing } from './imagetextalternative/imagetextalternativeediting.js';
|
|
27
|
+
export { default as ImageTextAlternativeUI } from './imagetextalternative/imagetextalternativeui.js';
|
|
28
|
+
export { default as ImageToolbar } from './imagetoolbar.js';
|
|
29
|
+
export { default as ImageUpload } from './imageupload.js';
|
|
30
|
+
export { default as ImageUploadEditing } from './imageupload/imageuploadediting.js';
|
|
31
|
+
export { default as ImageUploadProgress } from './imageupload/imageuploadprogress.js';
|
|
32
|
+
export { default as ImageUploadUI } from './imageupload/imageuploadui.js';
|
|
33
|
+
export { default as PictureEditing } from './pictureediting.js';
|
|
34
|
+
export { default as ImageBlock } from './imageblock.js';
|
|
35
|
+
export { default as ImageInline } from './imageinline.js';
|
|
36
|
+
export { default as ImageInsertViaUrl } from './imageinsertviaurl.js';
|
|
37
|
+
export { default as ImageUtils } from './imageutils.js';
|
|
38
|
+
export { default as ImageBlockEditing } from './image/imageblockediting.js';
|
|
39
|
+
export { default as ImageCaptionUI } from './imagecaption/imagecaptionui.js';
|
|
40
|
+
export { createImageTypeRegExp } from './imageupload/utils.js';
|
|
41
|
+
import './augmentation.js';
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
* @module image/pictureediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageEditing from './image/imageediting.js';
|
|
10
|
+
import ImageUtils from './imageutils.js';
|
|
11
|
+
/**
|
|
12
|
+
* This plugin enables the [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture) element support in the editor.
|
|
13
|
+
*
|
|
14
|
+
* * It enables the `sources` model attribute on `imageBlock` and `imageInline` model elements
|
|
15
|
+
* (brought by {@link module:image/imageblock~ImageBlock} and {@link module:image/imageinline~ImageInline}, respectively).
|
|
16
|
+
* * It translates the `sources` model element to the view (also: data) structure that may look as follows:
|
|
17
|
+
*
|
|
18
|
+
* ```html
|
|
19
|
+
* <p>Inline image using picture:
|
|
20
|
+
* <picture>
|
|
21
|
+
* <source media="(min-width: 800px)" srcset="image-large.webp" type="image/webp">
|
|
22
|
+
* <source media="(max-width: 800px)" srcset="image-small.webp" type="image/webp">
|
|
23
|
+
* <!-- Other sources as specified in the "sources" model attribute... -->
|
|
24
|
+
* <img src="image.png" alt="An image using picture" />
|
|
25
|
+
* </picture>
|
|
26
|
+
* </p>
|
|
27
|
+
*
|
|
28
|
+
* <p>Block image using picture:</p>
|
|
29
|
+
* <figure class="image">
|
|
30
|
+
* <picture>
|
|
31
|
+
* <source media="(min-width: 800px)" srcset="image-large.webp" type="image/webp">
|
|
32
|
+
* <source media="(max-width: 800px)" srcset="image-small.webp" type="image/webp">
|
|
33
|
+
* <!-- Other sources as specified in the "sources" model attribute... -->
|
|
34
|
+
* <img src="image.png" alt="An image using picture" />
|
|
35
|
+
* </picture>
|
|
36
|
+
* <figcaption>Caption of the image</figcaption>
|
|
37
|
+
* </figure>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* **Note:** The value of the `sources` {@glink framework/architecture/editing-engine#changing-the-model model attribute}
|
|
41
|
+
* in both examples equals:
|
|
42
|
+
*
|
|
43
|
+
* ```css
|
|
44
|
+
* [
|
|
45
|
+
* {
|
|
46
|
+
* media: '(min-width: 800px)',
|
|
47
|
+
* srcset: 'image-large.webp',
|
|
48
|
+
* type: 'image/webp'
|
|
49
|
+
* },
|
|
50
|
+
* {
|
|
51
|
+
* media: '(max-width: 800px)',
|
|
52
|
+
* srcset: 'image-small.webp',
|
|
53
|
+
* type: 'image/webp'
|
|
54
|
+
* }
|
|
55
|
+
* ]
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* * It integrates with the {@link module:image/imageupload~ImageUpload} plugin so images uploaded in the editor
|
|
59
|
+
* automatically render using `<picture>` if the {@glink features/images/image-upload/image-upload upload adapter}
|
|
60
|
+
* supports image sources and provides neccessary data.
|
|
61
|
+
*
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
export default class PictureEditing extends Plugin {
|
|
65
|
+
/**
|
|
66
|
+
* @inheritDoc
|
|
67
|
+
*/
|
|
68
|
+
static get requires(): readonly [typeof ImageEditing, typeof ImageUtils];
|
|
69
|
+
/**
|
|
70
|
+
* @inheritDoc
|
|
71
|
+
*/
|
|
72
|
+
static get pluginName(): "PictureEditing";
|
|
73
|
+
/**
|
|
74
|
+
* @inheritDoc
|
|
75
|
+
*/
|
|
76
|
+
static get isOfficialPlugin(): true;
|
|
77
|
+
/**
|
|
78
|
+
* @inheritDoc
|
|
79
|
+
*/
|
|
80
|
+
afterInit(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Configures conversion pipelines to support upcasting and downcasting images using the `<picture>` view element
|
|
83
|
+
* and the model `sources` attribute.
|
|
84
|
+
*/
|
|
85
|
+
private _setupConversion;
|
|
86
|
+
/**
|
|
87
|
+
* Makes it possible for uploaded images to get the `sources` model attribute and the `<picture>...</picture>`
|
|
88
|
+
* view structure out-of-the-box if relevant data is provided along the
|
|
89
|
+
* {@link module:image/imageupload/imageuploadediting~ImageUploadEditing#event:uploadComplete} event.
|
|
90
|
+
*/
|
|
91
|
+
private _setupImageUploadEditingIntegration;
|
|
92
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
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
|
+
* @module image/pictureediting
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageEditing from './image/imageediting.js';
|
|
10
|
+
import ImageUtils from './imageutils.js';
|
|
11
|
+
import { downcastSourcesAttribute, upcastPicture } from './image/converters.js';
|
|
12
|
+
/**
|
|
13
|
+
* This plugin enables the [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture) element support in the editor.
|
|
14
|
+
*
|
|
15
|
+
* * It enables the `sources` model attribute on `imageBlock` and `imageInline` model elements
|
|
16
|
+
* (brought by {@link module:image/imageblock~ImageBlock} and {@link module:image/imageinline~ImageInline}, respectively).
|
|
17
|
+
* * It translates the `sources` model element to the view (also: data) structure that may look as follows:
|
|
18
|
+
*
|
|
19
|
+
* ```html
|
|
20
|
+
* <p>Inline image using picture:
|
|
21
|
+
* <picture>
|
|
22
|
+
* <source media="(min-width: 800px)" srcset="image-large.webp" type="image/webp">
|
|
23
|
+
* <source media="(max-width: 800px)" srcset="image-small.webp" type="image/webp">
|
|
24
|
+
* <!-- Other sources as specified in the "sources" model attribute... -->
|
|
25
|
+
* <img src="image.png" alt="An image using picture" />
|
|
26
|
+
* </picture>
|
|
27
|
+
* </p>
|
|
28
|
+
*
|
|
29
|
+
* <p>Block image using picture:</p>
|
|
30
|
+
* <figure class="image">
|
|
31
|
+
* <picture>
|
|
32
|
+
* <source media="(min-width: 800px)" srcset="image-large.webp" type="image/webp">
|
|
33
|
+
* <source media="(max-width: 800px)" srcset="image-small.webp" type="image/webp">
|
|
34
|
+
* <!-- Other sources as specified in the "sources" model attribute... -->
|
|
35
|
+
* <img src="image.png" alt="An image using picture" />
|
|
36
|
+
* </picture>
|
|
37
|
+
* <figcaption>Caption of the image</figcaption>
|
|
38
|
+
* </figure>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* **Note:** The value of the `sources` {@glink framework/architecture/editing-engine#changing-the-model model attribute}
|
|
42
|
+
* in both examples equals:
|
|
43
|
+
*
|
|
44
|
+
* ```css
|
|
45
|
+
* [
|
|
46
|
+
* {
|
|
47
|
+
* media: '(min-width: 800px)',
|
|
48
|
+
* srcset: 'image-large.webp',
|
|
49
|
+
* type: 'image/webp'
|
|
50
|
+
* },
|
|
51
|
+
* {
|
|
52
|
+
* media: '(max-width: 800px)',
|
|
53
|
+
* srcset: 'image-small.webp',
|
|
54
|
+
* type: 'image/webp'
|
|
55
|
+
* }
|
|
56
|
+
* ]
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* * It integrates with the {@link module:image/imageupload~ImageUpload} plugin so images uploaded in the editor
|
|
60
|
+
* automatically render using `<picture>` if the {@glink features/images/image-upload/image-upload upload adapter}
|
|
61
|
+
* supports image sources and provides neccessary data.
|
|
62
|
+
*
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
export default class PictureEditing extends Plugin {
|
|
66
|
+
/**
|
|
67
|
+
* @inheritDoc
|
|
68
|
+
*/
|
|
69
|
+
static get requires() {
|
|
70
|
+
return [ImageEditing, ImageUtils];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @inheritDoc
|
|
74
|
+
*/
|
|
75
|
+
static get pluginName() {
|
|
76
|
+
return 'PictureEditing';
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @inheritDoc
|
|
80
|
+
*/
|
|
81
|
+
static get isOfficialPlugin() {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @inheritDoc
|
|
86
|
+
*/
|
|
87
|
+
afterInit() {
|
|
88
|
+
const editor = this.editor;
|
|
89
|
+
if (editor.plugins.has('ImageBlockEditing')) {
|
|
90
|
+
editor.model.schema.extend('imageBlock', {
|
|
91
|
+
allowAttributes: ['sources']
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (editor.plugins.has('ImageInlineEditing')) {
|
|
95
|
+
editor.model.schema.extend('imageInline', {
|
|
96
|
+
allowAttributes: ['sources']
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
this._setupConversion();
|
|
100
|
+
this._setupImageUploadEditingIntegration();
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Configures conversion pipelines to support upcasting and downcasting images using the `<picture>` view element
|
|
104
|
+
* and the model `sources` attribute.
|
|
105
|
+
*/
|
|
106
|
+
_setupConversion() {
|
|
107
|
+
const editor = this.editor;
|
|
108
|
+
const conversion = editor.conversion;
|
|
109
|
+
const imageUtils = editor.plugins.get('ImageUtils');
|
|
110
|
+
conversion.for('upcast').add(upcastPicture(imageUtils));
|
|
111
|
+
conversion.for('downcast').add(downcastSourcesAttribute(imageUtils));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Makes it possible for uploaded images to get the `sources` model attribute and the `<picture>...</picture>`
|
|
115
|
+
* view structure out-of-the-box if relevant data is provided along the
|
|
116
|
+
* {@link module:image/imageupload/imageuploadediting~ImageUploadEditing#event:uploadComplete} event.
|
|
117
|
+
*/
|
|
118
|
+
_setupImageUploadEditingIntegration() {
|
|
119
|
+
const editor = this.editor;
|
|
120
|
+
if (!editor.plugins.has('ImageUploadEditing')) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const imageUploadEditing = editor.plugins.get('ImageUploadEditing');
|
|
124
|
+
this.listenTo(imageUploadEditing, 'uploadComplete', (evt, { imageElement, data }) => {
|
|
125
|
+
const sources = data.sources;
|
|
126
|
+
if (!sources) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
editor.model.change(writer => {
|
|
130
|
+
writer.setAttributes({
|
|
131
|
+
sources
|
|
132
|
+
}, imageElement);
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
package/theme/image.css
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 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
|
+
.ck-content {
|
|
7
|
+
& .image {
|
|
8
|
+
display: table;
|
|
9
|
+
clear: both;
|
|
10
|
+
text-align: center;
|
|
11
|
+
|
|
12
|
+
/* Make sure there is some space between the content and the image. Center image by default. */
|
|
13
|
+
/* The first value should be equal to --ck-spacing-large variable if used in the editor context
|
|
14
|
+
to avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */
|
|
15
|
+
margin: 0.9em auto;
|
|
16
|
+
|
|
17
|
+
/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */
|
|
18
|
+
min-width: 50px;
|
|
19
|
+
|
|
20
|
+
& img {
|
|
21
|
+
/* Prevent unnecessary margins caused by line-height (see #44). */
|
|
22
|
+
display: block;
|
|
23
|
+
|
|
24
|
+
/* Center the image if its width is smaller than the content's width. */
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
|
|
27
|
+
/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
|
|
30
|
+
/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */
|
|
31
|
+
min-width: 100%;
|
|
32
|
+
|
|
33
|
+
/* Keep proportions of the block image if the height is set and the image is wider than the editor width.
|
|
34
|
+
See https://github.com/ckeditor/ckeditor5/issues/14542. */
|
|
35
|
+
height: auto;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
& .image-inline {
|
|
40
|
+
/*
|
|
41
|
+
* Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).
|
|
42
|
+
* Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.
|
|
43
|
+
* This strange behavior does not happen with inline-flex.
|
|
44
|
+
*/
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
|
|
47
|
+
/* While being resized, don't allow the image to exceed the width of the editing root. */
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
|
|
50
|
+
/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */
|
|
51
|
+
align-items: flex-start;
|
|
52
|
+
|
|
53
|
+
/* When the picture is present it must act as a flex container to let the img resize properly */
|
|
54
|
+
& picture {
|
|
55
|
+
display: flex;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* When the picture is present, it must act like a resizable img. */
|
|
59
|
+
& picture,
|
|
60
|
+
& img {
|
|
61
|
+
/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */
|
|
62
|
+
flex-grow: 1;
|
|
63
|
+
flex-shrink: 1;
|
|
64
|
+
|
|
65
|
+
/* Prevents overflowing the editing root boundaries when an inline image is very wide. */
|
|
66
|
+
max-width: 100%;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ck.ck-editor__editable {
|
|
72
|
+
/*
|
|
73
|
+
* Inhertit the content styles padding of the <figcaption> in case the integration overrides `text-align: center`
|
|
74
|
+
* of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native
|
|
75
|
+
* caret does, and not at the edge of <figcaption>.
|
|
76
|
+
*/
|
|
77
|
+
& .image > figcaption.ck-placeholder::before {
|
|
78
|
+
padding-left: inherit;
|
|
79
|
+
padding-right: inherit;
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
* Make sure the image caption placeholder doesn't overflow the placeholder area.
|
|
83
|
+
* See https://github.com/ckeditor/ckeditor5/issues/9162.
|
|
84
|
+
*/
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
text-overflow: ellipsis;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* See https://github.com/ckeditor/ckeditor5/issues/15115.
|
|
92
|
+
*/
|
|
93
|
+
& .image {
|
|
94
|
+
z-index: 1;
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* Make sure the selected image always stays on top of its siblings.
|
|
98
|
+
* See https://github.com/ckeditor/ckeditor5/issues/9108.
|
|
99
|
+
*/
|
|
100
|
+
&.ck-widget_selected {
|
|
101
|
+
z-index: 2;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/*
|
|
106
|
+
* See https://github.com/ckeditor/ckeditor5/issues/15115.
|
|
107
|
+
*/
|
|
108
|
+
& .image-inline {
|
|
109
|
+
z-index: 1;
|
|
110
|
+
|
|
111
|
+
/*
|
|
112
|
+
* Make sure the selected inline image always stays on top of its siblings.
|
|
113
|
+
* See https://github.com/ckeditor/ckeditor5/issues/9108.
|
|
114
|
+
*/
|
|
115
|
+
&.ck-widget_selected {
|
|
116
|
+
z-index: 2;
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* Make sure the native browser selection style is not displayed.
|
|
120
|
+
* Inline image widgets have their own styles for the selected state and
|
|
121
|
+
* leaving this up to the browser is asking for a visual collision.
|
|
122
|
+
*/
|
|
123
|
+
& ::selection {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Keep proportions of the inline image if the height is set and the image is wider than the editor width.
|
|
130
|
+
See https://github.com/ckeditor/ckeditor5/issues/14542. */
|
|
131
|
+
& .image-inline img {
|
|
132
|
+
height: auto;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* The inline image nested in the table should have its original size if not resized.
|
|
136
|
+
See https://github.com/ckeditor/ckeditor5/issues/9117. */
|
|
137
|
+
& td,
|
|
138
|
+
& th {
|
|
139
|
+
& .image-inline img {
|
|
140
|
+
max-width: none;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 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
|
+
@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--ck-color-image-caption-background: hsl(0, 0%, 97%);
|
|
10
|
+
--ck-color-image-caption-text: hsl(0, 0%, 20%);
|
|
11
|
+
--ck-color-image-caption-highlighted-background: hsl(52deg 100% 50%);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Content styles */
|
|
15
|
+
.ck-content .image > figcaption {
|
|
16
|
+
display: table-caption;
|
|
17
|
+
caption-side: bottom;
|
|
18
|
+
word-break: break-word;
|
|
19
|
+
color: var(--ck-color-image-caption-text);
|
|
20
|
+
background-color: var(--ck-color-image-caption-background);
|
|
21
|
+
padding: .6em;
|
|
22
|
+
font-size: .75em;
|
|
23
|
+
outline-offset: -1px;
|
|
24
|
+
|
|
25
|
+
/* Improve placeholder rendering in high-constrast mode (https://github.com/ckeditor/ckeditor5/issues/14907). */
|
|
26
|
+
@media (forced-colors: active) {
|
|
27
|
+
background-color: unset;
|
|
28
|
+
color: unset;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Editing styles */
|
|
33
|
+
.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {
|
|
34
|
+
@mixin ck-media-default-colors {
|
|
35
|
+
animation: ck-image-caption-highlight .6s ease-out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (prefers-reduced-motion: reduce) {
|
|
39
|
+
animation: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes ck-image-caption-highlight {
|
|
44
|
+
0% {
|
|
45
|
+
background-color: var(--ck-color-image-caption-highlighted-background);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
100% {
|
|
49
|
+
background-color: var(--ck-color-image-caption-background);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 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
|
+
@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";
|
|
7
|
+
|
|
8
|
+
.ck.ck-image-custom-resize-form {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
flex-wrap: nowrap;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
|
|
14
|
+
& .ck-labeled-field-view {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
& .ck-label {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin ck-media-phone {
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
|
|
25
|
+
& .ck-labeled-field-view {
|
|
26
|
+
flex-basis: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
& .ck-button {
|
|
30
|
+
flex-basis: 50%;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 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
|
+
.ck.ck-image-insert-url {
|
|
7
|
+
width: 400px;
|
|
8
|
+
padding: var(--ck-spacing-large) var(--ck-spacing-large) 0;
|
|
9
|
+
|
|
10
|
+
& .ck-image-insert-url__action-row {
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-columns: repeat(2, 1fr);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 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
|
+
.ck.ck-editor__editable {
|
|
7
|
+
& img.image_placeholder {
|
|
8
|
+
background-size: 100% 100%;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 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
|
+
/* Preserve aspect ratio of the resized image after introducing image height attribute. */
|
|
7
|
+
.ck-content img.image_resized {
|
|
8
|
+
height: auto;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ck-content .image.image_resized {
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
/*
|
|
14
|
+
The `<figure>` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.
|
|
15
|
+
See https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.
|
|
16
|
+
Fortunately, since we control the width, there is no risk that the image will look bad.
|
|
17
|
+
*/
|
|
18
|
+
display: block;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
|
|
21
|
+
& img {
|
|
22
|
+
/* For resized images it is the `<figure>` element that determines the image width. */
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
& > figcaption {
|
|
27
|
+
/* The `<figure>` element uses `display:block`, so `<figcaption>` also has to. */
|
|
28
|
+
display: block;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ck.ck-editor__editable {
|
|
33
|
+
/* The resized inline image nested in the table should respect its parent size.
|
|
34
|
+
See https://github.com/ckeditor/ckeditor5/issues/9117. */
|
|
35
|
+
& td,
|
|
36
|
+
& th {
|
|
37
|
+
& .image-inline.image_resized img {
|
|
38
|
+
max-width: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {
|
|
44
|
+
margin-right: var(--ck-spacing-standard);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {
|
|
48
|
+
margin-left: var(--ck-spacing-standard);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {
|
|
52
|
+
width: 4em;
|
|
53
|
+
}
|