@ckeditor/ckeditor5-image 41.3.1 → 41.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/image.js +2 -2
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/bg.js +1 -1
- package/build/translations/bn.js +1 -1
- package/build/translations/bs.js +1 -1
- package/build/translations/ca.js +1 -1
- package/build/translations/cs.js +1 -1
- package/build/translations/da.js +1 -1
- package/build/translations/de-ch.js +1 -1
- package/build/translations/de.js +1 -1
- package/build/translations/el.js +1 -1
- package/build/translations/en-au.js +1 -1
- package/build/translations/en-gb.js +1 -1
- package/build/translations/eo.js +1 -1
- package/build/translations/es-co.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/et.js +1 -1
- package/build/translations/eu.js +1 -1
- package/build/translations/fa.js +1 -1
- package/build/translations/fi.js +1 -1
- package/build/translations/fr.js +1 -1
- package/build/translations/gl.js +1 -1
- package/build/translations/he.js +1 -1
- package/build/translations/hi.js +1 -1
- package/build/translations/hr.js +1 -1
- package/build/translations/hu.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/it.js +1 -1
- package/build/translations/ja.js +1 -1
- package/build/translations/jv.js +1 -1
- package/build/translations/km.js +1 -1
- package/build/translations/kn.js +1 -1
- package/build/translations/ko.js +1 -1
- package/build/translations/ku.js +1 -1
- package/build/translations/lt.js +1 -1
- package/build/translations/lv.js +1 -1
- package/build/translations/ms.js +1 -1
- package/build/translations/nb.js +1 -1
- package/build/translations/ne.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/no.js +1 -1
- package/build/translations/pl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/pt.js +1 -1
- package/build/translations/ro.js +1 -1
- package/build/translations/ru.js +1 -1
- package/build/translations/si.js +1 -1
- package/build/translations/sk.js +1 -1
- package/build/translations/sq.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/sv.js +1 -1
- package/build/translations/th.js +1 -1
- package/build/translations/ti.js +1 -0
- package/build/translations/tk.js +1 -1
- package/build/translations/tr.js +1 -1
- package/build/translations/tt.js +1 -1
- package/build/translations/ug.js +1 -1
- package/build/translations/uk.js +1 -1
- package/build/translations/ur.js +1 -1
- package/build/translations/uz.js +1 -1
- package/build/translations/vi.js +1 -1
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +1 -1
- package/dist/index-content.css +105 -0
- package/dist/index-editor.css +129 -0
- package/dist/index.css +562 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +5637 -0
- package/dist/index.js.map +1 -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-co.d.ts +8 -0
- package/dist/translations/es-co.js +5 -0
- package/dist/translations/es-co.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/tt.d.ts +8 -0
- package/dist/translations/tt.js +5 -0
- package/dist/translations/tt.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/dist/types/augmentation.d.ts +61 -0
- package/dist/types/autoimage.d.ts +56 -0
- package/dist/types/image/converters.d.ts +70 -0
- package/dist/types/image/imageblockediting.d.ts +63 -0
- package/dist/types/image/imageediting.d.ts +34 -0
- package/dist/types/image/imageinlineediting.d.ts +64 -0
- package/dist/types/image/imageloadobserver.d.ts +52 -0
- package/dist/types/image/imageplaceholder.d.ts +43 -0
- package/dist/types/image/imagetypecommand.d.ts +48 -0
- package/dist/types/image/insertimagecommand.d.ts +70 -0
- package/dist/types/image/replaceimagesourcecommand.d.ts +55 -0
- package/dist/types/image/ui/utils.d.ts +29 -0
- package/dist/types/image/utils.d.ts +68 -0
- package/dist/types/image.d.ts +38 -0
- package/dist/types/imageblock.d.ts +38 -0
- package/dist/types/imagecaption/imagecaptionediting.d.ts +93 -0
- package/dist/types/imagecaption/imagecaptionui.d.ts +30 -0
- package/dist/types/imagecaption/imagecaptionutils.d.ts +42 -0
- package/dist/types/imagecaption/toggleimagecaptioncommand.d.ts +70 -0
- package/dist/types/imagecaption.d.ts +30 -0
- package/dist/types/imageconfig.d.ts +716 -0
- package/dist/types/imageinline.d.ts +38 -0
- package/dist/types/imageinsert/imageinsertui.d.ts +78 -0
- package/dist/types/imageinsert/imageinsertviaurlui.d.ts +48 -0
- package/dist/types/imageinsert/ui/imageinsertformview.d.ts +60 -0
- package/dist/types/imageinsert/ui/imageinserturlview.d.ts +111 -0
- package/dist/types/imageinsert.d.ts +37 -0
- package/dist/types/imageinsertviaurl.d.ts +35 -0
- package/dist/types/imageresize/imagecustomresizeui.d.ts +65 -0
- package/dist/types/imageresize/imageresizebuttons.d.ts +68 -0
- package/dist/types/imageresize/imageresizeediting.d.ts +45 -0
- package/dist/types/imageresize/imageresizehandles.d.ts +35 -0
- package/dist/types/imageresize/resizeimagecommand.d.ts +46 -0
- package/dist/types/imageresize/ui/imagecustomresizeformview.d.ts +133 -0
- package/dist/types/imageresize/utils/getselectedimageeditornodes.d.ts +28 -0
- package/dist/types/imageresize/utils/getselectedimagepossibleresizerange.d.ts +28 -0
- package/dist/types/imageresize/utils/getselectedimagewidthinunits.d.ts +22 -0
- package/dist/types/imageresize/utils/tryparsedimensionwithunit.d.ts +41 -0
- package/dist/types/imageresize.d.ts +32 -0
- package/dist/types/imagesizeattributes.d.ts +38 -0
- package/dist/types/imagestyle/converters.d.ts +28 -0
- package/dist/types/imagestyle/imagestylecommand.d.ts +72 -0
- package/dist/types/imagestyle/imagestyleediting.d.ts +54 -0
- package/dist/types/imagestyle/imagestyleui.d.ts +60 -0
- package/dist/types/imagestyle/utils.d.ts +105 -0
- package/dist/types/imagestyle.d.ts +36 -0
- package/dist/types/imagetextalternative/imagetextalternativecommand.d.ts +38 -0
- package/dist/types/imagetextalternative/imagetextalternativeediting.d.ts +32 -0
- package/dist/types/imagetextalternative/imagetextalternativeui.d.ts +72 -0
- package/dist/types/imagetextalternative/ui/textalternativeformview.d.ts +94 -0
- package/dist/types/imagetextalternative.d.ts +33 -0
- package/dist/types/imagetoolbar.d.ts +39 -0
- package/dist/types/imageupload/imageuploadediting.d.ts +115 -0
- package/dist/types/imageupload/imageuploadprogress.d.ts +46 -0
- package/dist/types/imageupload/imageuploadui.d.ts +34 -0
- package/dist/types/imageupload/uploadimagecommand.d.ts +64 -0
- package/dist/types/imageupload/utils.d.ts +37 -0
- package/dist/types/imageupload.d.ts +36 -0
- package/dist/types/imageutils.d.ts +129 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/types/pictureediting.d.ts +92 -0
- package/lang/contexts.json +9 -1
- package/lang/translations/ar.po +32 -0
- package/lang/translations/ast.po +32 -0
- package/lang/translations/az.po +32 -0
- package/lang/translations/bg.po +32 -0
- package/lang/translations/bn.po +32 -0
- package/lang/translations/bs.po +32 -0
- package/lang/translations/ca.po +32 -0
- package/lang/translations/cs.po +32 -0
- package/lang/translations/da.po +32 -0
- package/lang/translations/de-ch.po +32 -0
- package/lang/translations/de.po +32 -0
- package/lang/translations/el.po +32 -0
- package/lang/translations/en-au.po +32 -0
- package/lang/translations/en-gb.po +32 -0
- package/lang/translations/en.po +32 -0
- package/lang/translations/eo.po +32 -0
- package/lang/translations/es-co.po +32 -0
- package/lang/translations/es.po +32 -0
- package/lang/translations/et.po +32 -0
- package/lang/translations/eu.po +32 -0
- package/lang/translations/fa.po +32 -0
- package/lang/translations/fi.po +32 -0
- package/lang/translations/fr.po +32 -0
- package/lang/translations/gl.po +32 -0
- package/lang/translations/he.po +32 -0
- package/lang/translations/hi.po +32 -0
- package/lang/translations/hr.po +32 -0
- package/lang/translations/hu.po +32 -0
- package/lang/translations/id.po +32 -0
- package/lang/translations/it.po +32 -0
- package/lang/translations/ja.po +32 -0
- package/lang/translations/jv.po +32 -0
- package/lang/translations/km.po +32 -0
- package/lang/translations/kn.po +32 -0
- package/lang/translations/ko.po +32 -0
- package/lang/translations/ku.po +32 -0
- package/lang/translations/lt.po +32 -0
- package/lang/translations/lv.po +32 -0
- package/lang/translations/ms.po +32 -0
- package/lang/translations/nb.po +32 -0
- package/lang/translations/ne.po +32 -0
- package/lang/translations/nl.po +32 -0
- package/lang/translations/no.po +32 -0
- package/lang/translations/pl.po +32 -0
- package/lang/translations/pt-br.po +32 -0
- package/lang/translations/pt.po +32 -0
- package/lang/translations/ro.po +32 -0
- package/lang/translations/ru.po +32 -0
- package/lang/translations/si.po +32 -0
- package/lang/translations/sk.po +32 -0
- package/lang/translations/sq.po +32 -0
- package/lang/translations/sr-latn.po +32 -0
- package/lang/translations/sr.po +32 -0
- package/lang/translations/sv.po +32 -0
- package/lang/translations/th.po +32 -0
- package/lang/translations/ti.po +178 -0
- package/lang/translations/tk.po +32 -0
- package/lang/translations/tr.po +32 -0
- package/lang/translations/tt.po +32 -0
- package/lang/translations/ug.po +32 -0
- package/lang/translations/uk.po +32 -0
- package/lang/translations/ur.po +32 -0
- package/lang/translations/uz.po +32 -0
- package/lang/translations/vi.po +32 -0
- package/lang/translations/zh-cn.po +32 -0
- package/lang/translations/zh.po +32 -0
- package/package.json +4 -3
- package/src/augmentation.d.ts +2 -1
- package/src/imageresize/imagecustomresizeui.d.ts +61 -0
- package/src/imageresize/imagecustomresizeui.js +168 -0
- package/src/imageresize/imageresizebuttons.d.ts +0 -3
- package/src/imageresize/imageresizebuttons.js +95 -23
- package/src/imageresize/imageresizeediting.js +9 -2
- package/src/imageresize/imageresizehandles.js +1 -2
- 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 +2 -1
- package/src/imageresize.js +2 -1
- package/src/imageupload/imageuploadediting.js +9 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/theme/imagecaption.css +15 -1
- package/theme/imagecustomresizeform.css +33 -0
package/lang/translations/ug.po
CHANGED
|
@@ -113,10 +113,22 @@ msgctxt "The accessibility label of the standalone image resize reset option but
|
|
|
113
113
|
msgid "Resize image to the original size"
|
|
114
114
|
msgstr ""
|
|
115
115
|
|
|
116
|
+
msgctxt "The label for image resize balloon input."
|
|
117
|
+
msgid "Resize image (in %0)"
|
|
118
|
+
msgstr ""
|
|
119
|
+
|
|
116
120
|
msgctxt "The default label for the resize option that resets the size of the image."
|
|
117
121
|
msgid "Original"
|
|
118
122
|
msgstr ""
|
|
119
123
|
|
|
124
|
+
msgctxt "The accessibility label of the standalone image resize custom option button in the image toolbar for screen readers."
|
|
125
|
+
msgid "Custom image size"
|
|
126
|
+
msgstr ""
|
|
127
|
+
|
|
128
|
+
msgctxt "The label for the resize option that allows user to enter custom size of the image."
|
|
129
|
+
msgid "Custom"
|
|
130
|
+
msgstr ""
|
|
131
|
+
|
|
120
132
|
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
121
133
|
msgid "Image resize list"
|
|
122
134
|
msgstr ""
|
|
@@ -144,3 +156,23 @@ msgstr ""
|
|
|
144
156
|
msgctxt "Text used by screen readers do describe an image when there is a text alternative available, e.g. 'Caption for image: this is a description of the image.'"
|
|
145
157
|
msgid "Caption for image: %0"
|
|
146
158
|
msgstr ""
|
|
159
|
+
|
|
160
|
+
msgctxt "Text used as error label when user submitted custom image resize form with blank value."
|
|
161
|
+
msgid "The value must not be empty."
|
|
162
|
+
msgstr ""
|
|
163
|
+
|
|
164
|
+
msgctxt "Text used as error label when user submitted custom image resize form with incorrect value."
|
|
165
|
+
msgid "The value should be a plain number."
|
|
166
|
+
msgstr ""
|
|
167
|
+
|
|
168
|
+
msgctxt "Aria status message indicating that the image is being uploaded. Example: 'Uploading image'."
|
|
169
|
+
msgid "Uploading image"
|
|
170
|
+
msgstr ""
|
|
171
|
+
|
|
172
|
+
msgctxt "Aria status message indicating that the image has been uploaded successfully. Example: 'Image upload complete'."
|
|
173
|
+
msgid "Image upload complete"
|
|
174
|
+
msgstr ""
|
|
175
|
+
|
|
176
|
+
msgctxt "Aria status message indicating that an error has occurred during image upload. Example: 'Error during image upload'."
|
|
177
|
+
msgid "Error during image upload"
|
|
178
|
+
msgstr ""
|
package/lang/translations/uk.po
CHANGED
|
@@ -113,10 +113,22 @@ msgctxt "The accessibility label of the standalone image resize reset option but
|
|
|
113
113
|
msgid "Resize image to the original size"
|
|
114
114
|
msgstr "Розтягнути зображення до оригінального розміру"
|
|
115
115
|
|
|
116
|
+
msgctxt "The label for image resize balloon input."
|
|
117
|
+
msgid "Resize image (in %0)"
|
|
118
|
+
msgstr "Змінити розмір зображення (у %0)"
|
|
119
|
+
|
|
116
120
|
msgctxt "The default label for the resize option that resets the size of the image."
|
|
117
121
|
msgid "Original"
|
|
118
122
|
msgstr "Оригінал"
|
|
119
123
|
|
|
124
|
+
msgctxt "The accessibility label of the standalone image resize custom option button in the image toolbar for screen readers."
|
|
125
|
+
msgid "Custom image size"
|
|
126
|
+
msgstr "Власний розмір зображення"
|
|
127
|
+
|
|
128
|
+
msgctxt "The label for the resize option that allows user to enter custom size of the image."
|
|
129
|
+
msgid "Custom"
|
|
130
|
+
msgstr "Власний"
|
|
131
|
+
|
|
120
132
|
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
121
133
|
msgid "Image resize list"
|
|
122
134
|
msgstr "Перелік розмірів"
|
|
@@ -144,3 +156,23 @@ msgstr "Підпис до зображення"
|
|
|
144
156
|
msgctxt "Text used by screen readers do describe an image when there is a text alternative available, e.g. 'Caption for image: this is a description of the image.'"
|
|
145
157
|
msgid "Caption for image: %0"
|
|
146
158
|
msgstr "Підпис до зображення: %0"
|
|
159
|
+
|
|
160
|
+
msgctxt "Text used as error label when user submitted custom image resize form with blank value."
|
|
161
|
+
msgid "The value must not be empty."
|
|
162
|
+
msgstr "Значення не може бути порожнім."
|
|
163
|
+
|
|
164
|
+
msgctxt "Text used as error label when user submitted custom image resize form with incorrect value."
|
|
165
|
+
msgid "The value should be a plain number."
|
|
166
|
+
msgstr "Значення має виражатись простим числом."
|
|
167
|
+
|
|
168
|
+
msgctxt "Aria status message indicating that the image is being uploaded. Example: 'Uploading image'."
|
|
169
|
+
msgid "Uploading image"
|
|
170
|
+
msgstr "Зображення завантажується"
|
|
171
|
+
|
|
172
|
+
msgctxt "Aria status message indicating that the image has been uploaded successfully. Example: 'Image upload complete'."
|
|
173
|
+
msgid "Image upload complete"
|
|
174
|
+
msgstr "Завантаження зображення завершено"
|
|
175
|
+
|
|
176
|
+
msgctxt "Aria status message indicating that an error has occurred during image upload. Example: 'Error during image upload'."
|
|
177
|
+
msgid "Error during image upload"
|
|
178
|
+
msgstr "Під час завантаження зображення сталася помилка"
|
package/lang/translations/ur.po
CHANGED
|
@@ -113,10 +113,22 @@ msgctxt "The accessibility label of the standalone image resize reset option but
|
|
|
113
113
|
msgid "Resize image to the original size"
|
|
114
114
|
msgstr ""
|
|
115
115
|
|
|
116
|
+
msgctxt "The label for image resize balloon input."
|
|
117
|
+
msgid "Resize image (in %0)"
|
|
118
|
+
msgstr ""
|
|
119
|
+
|
|
116
120
|
msgctxt "The default label for the resize option that resets the size of the image."
|
|
117
121
|
msgid "Original"
|
|
118
122
|
msgstr ""
|
|
119
123
|
|
|
124
|
+
msgctxt "The accessibility label of the standalone image resize custom option button in the image toolbar for screen readers."
|
|
125
|
+
msgid "Custom image size"
|
|
126
|
+
msgstr ""
|
|
127
|
+
|
|
128
|
+
msgctxt "The label for the resize option that allows user to enter custom size of the image."
|
|
129
|
+
msgid "Custom"
|
|
130
|
+
msgstr ""
|
|
131
|
+
|
|
120
132
|
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
121
133
|
msgid "Image resize list"
|
|
122
134
|
msgstr ""
|
|
@@ -144,3 +156,23 @@ msgstr ""
|
|
|
144
156
|
msgctxt "Text used by screen readers do describe an image when there is a text alternative available, e.g. 'Caption for image: this is a description of the image.'"
|
|
145
157
|
msgid "Caption for image: %0"
|
|
146
158
|
msgstr ""
|
|
159
|
+
|
|
160
|
+
msgctxt "Text used as error label when user submitted custom image resize form with blank value."
|
|
161
|
+
msgid "The value must not be empty."
|
|
162
|
+
msgstr ""
|
|
163
|
+
|
|
164
|
+
msgctxt "Text used as error label when user submitted custom image resize form with incorrect value."
|
|
165
|
+
msgid "The value should be a plain number."
|
|
166
|
+
msgstr ""
|
|
167
|
+
|
|
168
|
+
msgctxt "Aria status message indicating that the image is being uploaded. Example: 'Uploading image'."
|
|
169
|
+
msgid "Uploading image"
|
|
170
|
+
msgstr ""
|
|
171
|
+
|
|
172
|
+
msgctxt "Aria status message indicating that the image has been uploaded successfully. Example: 'Image upload complete'."
|
|
173
|
+
msgid "Image upload complete"
|
|
174
|
+
msgstr ""
|
|
175
|
+
|
|
176
|
+
msgctxt "Aria status message indicating that an error has occurred during image upload. Example: 'Error during image upload'."
|
|
177
|
+
msgid "Error during image upload"
|
|
178
|
+
msgstr ""
|
package/lang/translations/uz.po
CHANGED
|
@@ -113,10 +113,22 @@ msgctxt "The accessibility label of the standalone image resize reset option but
|
|
|
113
113
|
msgid "Resize image to the original size"
|
|
114
114
|
msgstr "Rasmning o'lchamini asl o'lchamiga o'zgartiring"
|
|
115
115
|
|
|
116
|
+
msgctxt "The label for image resize balloon input."
|
|
117
|
+
msgid "Resize image (in %0)"
|
|
118
|
+
msgstr ""
|
|
119
|
+
|
|
116
120
|
msgctxt "The default label for the resize option that resets the size of the image."
|
|
117
121
|
msgid "Original"
|
|
118
122
|
msgstr "Asl"
|
|
119
123
|
|
|
124
|
+
msgctxt "The accessibility label of the standalone image resize custom option button in the image toolbar for screen readers."
|
|
125
|
+
msgid "Custom image size"
|
|
126
|
+
msgstr ""
|
|
127
|
+
|
|
128
|
+
msgctxt "The label for the resize option that allows user to enter custom size of the image."
|
|
129
|
+
msgid "Custom"
|
|
130
|
+
msgstr ""
|
|
131
|
+
|
|
120
132
|
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
121
133
|
msgid "Image resize list"
|
|
122
134
|
msgstr "Hajmlar ro'yxati"
|
|
@@ -144,3 +156,23 @@ msgstr ""
|
|
|
144
156
|
msgctxt "Text used by screen readers do describe an image when there is a text alternative available, e.g. 'Caption for image: this is a description of the image.'"
|
|
145
157
|
msgid "Caption for image: %0"
|
|
146
158
|
msgstr ""
|
|
159
|
+
|
|
160
|
+
msgctxt "Text used as error label when user submitted custom image resize form with blank value."
|
|
161
|
+
msgid "The value must not be empty."
|
|
162
|
+
msgstr ""
|
|
163
|
+
|
|
164
|
+
msgctxt "Text used as error label when user submitted custom image resize form with incorrect value."
|
|
165
|
+
msgid "The value should be a plain number."
|
|
166
|
+
msgstr ""
|
|
167
|
+
|
|
168
|
+
msgctxt "Aria status message indicating that the image is being uploaded. Example: 'Uploading image'."
|
|
169
|
+
msgid "Uploading image"
|
|
170
|
+
msgstr ""
|
|
171
|
+
|
|
172
|
+
msgctxt "Aria status message indicating that the image has been uploaded successfully. Example: 'Image upload complete'."
|
|
173
|
+
msgid "Image upload complete"
|
|
174
|
+
msgstr ""
|
|
175
|
+
|
|
176
|
+
msgctxt "Aria status message indicating that an error has occurred during image upload. Example: 'Error during image upload'."
|
|
177
|
+
msgid "Error during image upload"
|
|
178
|
+
msgstr ""
|
package/lang/translations/vi.po
CHANGED
|
@@ -113,10 +113,22 @@ msgctxt "The accessibility label of the standalone image resize reset option but
|
|
|
113
113
|
msgid "Resize image to the original size"
|
|
114
114
|
msgstr "Chỉnh về ảnh kích cỡ nguyên gốc"
|
|
115
115
|
|
|
116
|
+
msgctxt "The label for image resize balloon input."
|
|
117
|
+
msgid "Resize image (in %0)"
|
|
118
|
+
msgstr "Đặt lại kích thước hình ảnh (bằng %0)"
|
|
119
|
+
|
|
116
120
|
msgctxt "The default label for the resize option that resets the size of the image."
|
|
117
121
|
msgid "Original"
|
|
118
122
|
msgstr "Nguyên bản"
|
|
119
123
|
|
|
124
|
+
msgctxt "The accessibility label of the standalone image resize custom option button in the image toolbar for screen readers."
|
|
125
|
+
msgid "Custom image size"
|
|
126
|
+
msgstr "Tùy chỉnh kích thước hình ảnh"
|
|
127
|
+
|
|
128
|
+
msgctxt "The label for the resize option that allows user to enter custom size of the image."
|
|
129
|
+
msgid "Custom"
|
|
130
|
+
msgstr "Tùy chỉnh"
|
|
131
|
+
|
|
120
132
|
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
121
133
|
msgid "Image resize list"
|
|
122
134
|
msgstr "Danh sách ảnh đã chỉnh kích thước"
|
|
@@ -144,3 +156,23 @@ msgstr "Chú thích cho hình ảnh"
|
|
|
144
156
|
msgctxt "Text used by screen readers do describe an image when there is a text alternative available, e.g. 'Caption for image: this is a description of the image.'"
|
|
145
157
|
msgid "Caption for image: %0"
|
|
146
158
|
msgstr "Chú thích cho hình ảnh: %0"
|
|
159
|
+
|
|
160
|
+
msgctxt "Text used as error label when user submitted custom image resize form with blank value."
|
|
161
|
+
msgid "The value must not be empty."
|
|
162
|
+
msgstr "Không được để trống giá trị này."
|
|
163
|
+
|
|
164
|
+
msgctxt "Text used as error label when user submitted custom image resize form with incorrect value."
|
|
165
|
+
msgid "The value should be a plain number."
|
|
166
|
+
msgstr "Giá trị này phải là một số thường."
|
|
167
|
+
|
|
168
|
+
msgctxt "Aria status message indicating that the image is being uploaded. Example: 'Uploading image'."
|
|
169
|
+
msgid "Uploading image"
|
|
170
|
+
msgstr "Đang tải hình ảnh lên"
|
|
171
|
+
|
|
172
|
+
msgctxt "Aria status message indicating that the image has been uploaded successfully. Example: 'Image upload complete'."
|
|
173
|
+
msgid "Image upload complete"
|
|
174
|
+
msgstr "Hoàn tất quá trình tải hình ảnh lên"
|
|
175
|
+
|
|
176
|
+
msgctxt "Aria status message indicating that an error has occurred during image upload. Example: 'Error during image upload'."
|
|
177
|
+
msgid "Error during image upload"
|
|
178
|
+
msgstr "Xảy ra lỗi trong quá trình tải hình ảnh lên"
|
|
@@ -113,10 +113,22 @@ msgctxt "The accessibility label of the standalone image resize reset option but
|
|
|
113
113
|
msgid "Resize image to the original size"
|
|
114
114
|
msgstr "调整图像大小为原始大小"
|
|
115
115
|
|
|
116
|
+
msgctxt "The label for image resize balloon input."
|
|
117
|
+
msgid "Resize image (in %0)"
|
|
118
|
+
msgstr "调整图片大小(单位为 %0)"
|
|
119
|
+
|
|
116
120
|
msgctxt "The default label for the resize option that resets the size of the image."
|
|
117
121
|
msgid "Original"
|
|
118
122
|
msgstr "原始大小"
|
|
119
123
|
|
|
124
|
+
msgctxt "The accessibility label of the standalone image resize custom option button in the image toolbar for screen readers."
|
|
125
|
+
msgid "Custom image size"
|
|
126
|
+
msgstr "自定义图片大小"
|
|
127
|
+
|
|
128
|
+
msgctxt "The label for the resize option that allows user to enter custom size of the image."
|
|
129
|
+
msgid "Custom"
|
|
130
|
+
msgstr "自定义"
|
|
131
|
+
|
|
120
132
|
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
121
133
|
msgid "Image resize list"
|
|
122
134
|
msgstr "图片大小列表"
|
|
@@ -144,3 +156,23 @@ msgstr "图片说明:"
|
|
|
144
156
|
msgctxt "Text used by screen readers do describe an image when there is a text alternative available, e.g. 'Caption for image: this is a description of the image.'"
|
|
145
157
|
msgid "Caption for image: %0"
|
|
146
158
|
msgstr "图片说明:%0"
|
|
159
|
+
|
|
160
|
+
msgctxt "Text used as error label when user submitted custom image resize form with blank value."
|
|
161
|
+
msgid "The value must not be empty."
|
|
162
|
+
msgstr "该值不能为空。"
|
|
163
|
+
|
|
164
|
+
msgctxt "Text used as error label when user submitted custom image resize form with incorrect value."
|
|
165
|
+
msgid "The value should be a plain number."
|
|
166
|
+
msgstr "该值应当为纯数字。"
|
|
167
|
+
|
|
168
|
+
msgctxt "Aria status message indicating that the image is being uploaded. Example: 'Uploading image'."
|
|
169
|
+
msgid "Uploading image"
|
|
170
|
+
msgstr "正在上传图片"
|
|
171
|
+
|
|
172
|
+
msgctxt "Aria status message indicating that the image has been uploaded successfully. Example: 'Image upload complete'."
|
|
173
|
+
msgid "Image upload complete"
|
|
174
|
+
msgstr "图片上传完成"
|
|
175
|
+
|
|
176
|
+
msgctxt "Aria status message indicating that an error has occurred during image upload. Example: 'Error during image upload'."
|
|
177
|
+
msgid "Error during image upload"
|
|
178
|
+
msgstr "图片上传时出错"
|
package/lang/translations/zh.po
CHANGED
|
@@ -113,10 +113,22 @@ msgctxt "The accessibility label of the standalone image resize reset option but
|
|
|
113
113
|
msgid "Resize image to the original size"
|
|
114
114
|
msgstr "縮放圖片到原始尺寸"
|
|
115
115
|
|
|
116
|
+
msgctxt "The label for image resize balloon input."
|
|
117
|
+
msgid "Resize image (in %0)"
|
|
118
|
+
msgstr "調整圖片大小(單位為 %0)"
|
|
119
|
+
|
|
116
120
|
msgctxt "The default label for the resize option that resets the size of the image."
|
|
117
121
|
msgid "Original"
|
|
118
122
|
msgstr "原始圖片"
|
|
119
123
|
|
|
124
|
+
msgctxt "The accessibility label of the standalone image resize custom option button in the image toolbar for screen readers."
|
|
125
|
+
msgid "Custom image size"
|
|
126
|
+
msgstr "自訂圖片大小"
|
|
127
|
+
|
|
128
|
+
msgctxt "The label for the resize option that allows user to enter custom size of the image."
|
|
129
|
+
msgid "Custom"
|
|
130
|
+
msgstr "自訂"
|
|
131
|
+
|
|
120
132
|
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
121
133
|
msgid "Image resize list"
|
|
122
134
|
msgstr "圖片縮放清單"
|
|
@@ -144,3 +156,23 @@ msgstr "影像的標題"
|
|
|
144
156
|
msgctxt "Text used by screen readers do describe an image when there is a text alternative available, e.g. 'Caption for image: this is a description of the image.'"
|
|
145
157
|
msgid "Caption for image: %0"
|
|
146
158
|
msgstr "影像標題:%0"
|
|
159
|
+
|
|
160
|
+
msgctxt "Text used as error label when user submitted custom image resize form with blank value."
|
|
161
|
+
msgid "The value must not be empty."
|
|
162
|
+
msgstr "數值不得為空白。"
|
|
163
|
+
|
|
164
|
+
msgctxt "Text used as error label when user submitted custom image resize form with incorrect value."
|
|
165
|
+
msgid "The value should be a plain number."
|
|
166
|
+
msgstr "數值應為純數字。"
|
|
167
|
+
|
|
168
|
+
msgctxt "Aria status message indicating that the image is being uploaded. Example: 'Uploading image'."
|
|
169
|
+
msgid "Uploading image"
|
|
170
|
+
msgstr "正在上傳圖片"
|
|
171
|
+
|
|
172
|
+
msgctxt "Aria status message indicating that the image has been uploaded successfully. Example: 'Image upload complete'."
|
|
173
|
+
msgid "Image upload complete"
|
|
174
|
+
msgstr "圖片上傳完成"
|
|
175
|
+
|
|
176
|
+
msgctxt "Aria status message indicating that an error has occurred during image upload. Example: 'Error during image upload'."
|
|
177
|
+
msgid "Error during image upload"
|
|
178
|
+
msgstr "圖片上傳期間發生錯誤"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-image",
|
|
3
|
-
"version": "41.
|
|
3
|
+
"version": "41.4.0",
|
|
4
4
|
"description": "Image feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ckeditor/ckeditor5-ui": "41.
|
|
17
|
-
"ckeditor5": "41.
|
|
16
|
+
"@ckeditor/ckeditor5-ui": "41.4.0",
|
|
17
|
+
"ckeditor5": "41.4.0",
|
|
18
18
|
"lodash-es": "4.17.21"
|
|
19
19
|
},
|
|
20
20
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"directory": "packages/ckeditor5-image"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
|
+
"dist",
|
|
30
31
|
"lang",
|
|
31
32
|
"src/**/*.js",
|
|
32
33
|
"src/**/*.d.ts",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { ImageConfig, AutoImage, Image, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, ImageUtils, ImageBlockEditing, ImageEditing, ImageCaptionEditing, ImageCaptionUI, ImageCaptionUtils, ImageInsertUI, ImageResizeEditing, ImageSizeAttributes, ImageStyleEditing, ImageStyleUI, ImageTextAlternativeEditing, ImageTextAlternativeUI, ImageUploadEditing, ImageUploadProgress, ImageUploadUI, ImageTypeCommand, InsertImageCommand, ReplaceImageSourceCommand, ToggleImageCaptionCommand, ResizeImageCommand, ImageStyleCommand, ImageTextAlternativeCommand, UploadImageCommand } from './index.js';
|
|
5
|
+
import type { ImageConfig, AutoImage, Image, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, ImageUtils, ImageBlockEditing, ImageEditing, ImageCaptionEditing, ImageCaptionUI, ImageCaptionUtils, ImageInsertUI, ImageResizeEditing, ImageCustomResizeUI, ImageSizeAttributes, ImageStyleEditing, ImageStyleUI, ImageTextAlternativeEditing, ImageTextAlternativeUI, ImageUploadEditing, ImageUploadProgress, ImageUploadUI, ImageTypeCommand, InsertImageCommand, ReplaceImageSourceCommand, ToggleImageCaptionCommand, ResizeImageCommand, ImageStyleCommand, ImageTextAlternativeCommand, UploadImageCommand } from './index.js';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface EditorConfig {
|
|
8
8
|
/**
|
|
@@ -33,6 +33,7 @@ declare module '@ckeditor/ckeditor5-core' {
|
|
|
33
33
|
[ImageCaptionUtils.pluginName]: ImageCaptionUtils;
|
|
34
34
|
[ImageInsertUI.pluginName]: ImageInsertUI;
|
|
35
35
|
[ImageResizeEditing.pluginName]: ImageResizeEditing;
|
|
36
|
+
[ImageCustomResizeUI.pluginName]: ImageCustomResizeUI;
|
|
36
37
|
[ImageSizeAttributes.pluginName]: ImageSizeAttributes;
|
|
37
38
|
[ImageStyleEditing.pluginName]: ImageStyleEditing;
|
|
38
39
|
[ImageStyleUI.pluginName]: ImageStyleUI;
|
|
@@ -0,0 +1,61 @@
|
|
|
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/imageresize/imagecustomresizeui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
10
|
+
/**
|
|
11
|
+
* The custom resize image UI plugin.
|
|
12
|
+
*
|
|
13
|
+
* The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.
|
|
14
|
+
*/
|
|
15
|
+
export default class ImageCustomResizeUI extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* The contextual balloon plugin instance.
|
|
18
|
+
*/
|
|
19
|
+
private _balloon?;
|
|
20
|
+
/**
|
|
21
|
+
* A form containing a textarea and buttons, used to change the `alt` text value.
|
|
22
|
+
*/
|
|
23
|
+
private _form?;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get requires(): readonly [typeof ContextualBalloon];
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get pluginName(): "ImageCustomResizeUI";
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
destroy(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Creates the {@link module:image/imageresize/ui/imagecustomresizeformview~ImageCustomResizeFormView}
|
|
38
|
+
* form.
|
|
39
|
+
*/
|
|
40
|
+
private _createForm;
|
|
41
|
+
/**
|
|
42
|
+
* Shows the {@link #_form} in the {@link #_balloon}.
|
|
43
|
+
*
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
_showForm(unit: string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Removes the {@link #_form} from the {@link #_balloon}.
|
|
49
|
+
*
|
|
50
|
+
* @param focusEditable Controls whether the editing view is focused afterwards.
|
|
51
|
+
*/
|
|
52
|
+
private _hideForm;
|
|
53
|
+
/**
|
|
54
|
+
* Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.
|
|
55
|
+
*/
|
|
56
|
+
private get _isVisible();
|
|
57
|
+
/**
|
|
58
|
+
* Returns `true` when the {@link #_form} is in the {@link #_balloon}.
|
|
59
|
+
*/
|
|
60
|
+
private get _isInBalloon();
|
|
61
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
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/imageresize/imagecustomresizeui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ContextualBalloon, clickOutsideHandler, CssTransitionDisablerMixin } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { getBalloonPositionData } from '../image/ui/utils.js';
|
|
11
|
+
import { getSelectedImageWidthInUnits } from './utils/getselectedimagewidthinunits.js';
|
|
12
|
+
import ImageCustomResizeFormView from './ui/imagecustomresizeformview.js';
|
|
13
|
+
import { getSelectedImagePossibleResizeRange } from './utils/getselectedimagepossibleresizerange.js';
|
|
14
|
+
/**
|
|
15
|
+
* The custom resize image UI plugin.
|
|
16
|
+
*
|
|
17
|
+
* The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.
|
|
18
|
+
*/
|
|
19
|
+
export default class ImageCustomResizeUI extends Plugin {
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires() {
|
|
24
|
+
return [ContextualBalloon];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName() {
|
|
30
|
+
return 'ImageCustomResizeUI';
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
destroy() {
|
|
36
|
+
super.destroy();
|
|
37
|
+
// Destroy created UI components as they are not automatically destroyed (see ckeditor5#1341).
|
|
38
|
+
if (this._form) {
|
|
39
|
+
this._form.destroy();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates the {@link module:image/imageresize/ui/imagecustomresizeformview~ImageCustomResizeFormView}
|
|
44
|
+
* form.
|
|
45
|
+
*/
|
|
46
|
+
_createForm(unit) {
|
|
47
|
+
const editor = this.editor;
|
|
48
|
+
this._balloon = this.editor.plugins.get('ContextualBalloon');
|
|
49
|
+
this._form = new (CssTransitionDisablerMixin(ImageCustomResizeFormView))(editor.locale, unit, getFormValidators(editor));
|
|
50
|
+
// Render the form so its #element is available for clickOutsideHandler.
|
|
51
|
+
this._form.render();
|
|
52
|
+
this.listenTo(this._form, 'submit', () => {
|
|
53
|
+
if (this._form.isValid()) {
|
|
54
|
+
editor.execute('resizeImage', {
|
|
55
|
+
width: this._form.sizeWithUnits
|
|
56
|
+
});
|
|
57
|
+
this._hideForm(true);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
// Update balloon position when form error label is added .
|
|
61
|
+
this.listenTo(this._form.labeledInput, 'change:errorText', () => {
|
|
62
|
+
editor.ui.update();
|
|
63
|
+
});
|
|
64
|
+
this.listenTo(this._form, 'cancel', () => {
|
|
65
|
+
this._hideForm(true);
|
|
66
|
+
});
|
|
67
|
+
// Close the form on Esc key press.
|
|
68
|
+
this._form.keystrokes.set('Esc', (data, cancel) => {
|
|
69
|
+
this._hideForm(true);
|
|
70
|
+
cancel();
|
|
71
|
+
});
|
|
72
|
+
// Close on click outside of balloon panel element.
|
|
73
|
+
clickOutsideHandler({
|
|
74
|
+
emitter: this._form,
|
|
75
|
+
activator: () => this._isVisible,
|
|
76
|
+
contextElements: () => [this._balloon.view.element],
|
|
77
|
+
callback: () => this._hideForm()
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Shows the {@link #_form} in the {@link #_balloon}.
|
|
82
|
+
*
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
_showForm(unit) {
|
|
86
|
+
if (this._isVisible) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (!this._form) {
|
|
90
|
+
this._createForm(unit);
|
|
91
|
+
}
|
|
92
|
+
const editor = this.editor;
|
|
93
|
+
const labeledInput = this._form.labeledInput;
|
|
94
|
+
this._form.disableCssTransitions();
|
|
95
|
+
this._form.resetFormStatus();
|
|
96
|
+
if (!this._isInBalloon) {
|
|
97
|
+
this._balloon.add({
|
|
98
|
+
view: this._form,
|
|
99
|
+
position: getBalloonPositionData(editor)
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
// Make sure that each time the panel shows up, the field remains in sync with the value of
|
|
103
|
+
// the command. If the user typed in the input, then canceled the balloon (`labeledInput#value`
|
|
104
|
+
// stays unaltered) and re-opened it without changing the value of the command, they would see the
|
|
105
|
+
// old value instead of the actual value of the command.
|
|
106
|
+
const currentParsedWidth = getSelectedImageWidthInUnits(editor, unit);
|
|
107
|
+
const initialInputValue = currentParsedWidth ? currentParsedWidth.value.toFixed(1) : '';
|
|
108
|
+
const possibleRange = getSelectedImagePossibleResizeRange(editor, unit);
|
|
109
|
+
labeledInput.fieldView.value = labeledInput.fieldView.element.value = initialInputValue;
|
|
110
|
+
if (possibleRange) {
|
|
111
|
+
Object.assign(labeledInput.fieldView, {
|
|
112
|
+
min: possibleRange.lower.toFixed(1),
|
|
113
|
+
max: Math.ceil(possibleRange.upper).toFixed(1)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
this._form.labeledInput.fieldView.select();
|
|
117
|
+
this._form.enableCssTransitions();
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Removes the {@link #_form} from the {@link #_balloon}.
|
|
121
|
+
*
|
|
122
|
+
* @param focusEditable Controls whether the editing view is focused afterwards.
|
|
123
|
+
*/
|
|
124
|
+
_hideForm(focusEditable = false) {
|
|
125
|
+
if (!this._isInBalloon) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
// Blur the input element before removing it from DOM to prevent issues in some browsers.
|
|
129
|
+
// See https://github.com/ckeditor/ckeditor5/issues/1501.
|
|
130
|
+
if (this._form.focusTracker.isFocused) {
|
|
131
|
+
this._form.saveButtonView.focus();
|
|
132
|
+
}
|
|
133
|
+
this._balloon.remove(this._form);
|
|
134
|
+
if (focusEditable) {
|
|
135
|
+
this.editor.editing.view.focus();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.
|
|
140
|
+
*/
|
|
141
|
+
get _isVisible() {
|
|
142
|
+
return !!this._balloon && this._balloon.visibleView === this._form;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Returns `true` when the {@link #_form} is in the {@link #_balloon}.
|
|
146
|
+
*/
|
|
147
|
+
get _isInBalloon() {
|
|
148
|
+
return !!this._balloon && this._balloon.hasView(this._form);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Returns image resize form validation callbacks.
|
|
153
|
+
*
|
|
154
|
+
* @param editor Editor instance.
|
|
155
|
+
*/
|
|
156
|
+
function getFormValidators(editor) {
|
|
157
|
+
const t = editor.t;
|
|
158
|
+
return [
|
|
159
|
+
form => {
|
|
160
|
+
if (form.rawSize.trim() === '') {
|
|
161
|
+
return t('The value must not be empty.');
|
|
162
|
+
}
|
|
163
|
+
if (form.parsedSize === null) {
|
|
164
|
+
return t('The value should be a plain number.');
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
];
|
|
168
|
+
}
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module image/imageresize/imageresizebuttons
|
|
7
|
-
*/
|
|
8
5
|
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
6
|
import ImageResizeEditing from './imageresizeediting.js';
|
|
10
7
|
/**
|