@ckeditor/ckeditor5-image 48.2.0 → 48.3.0-alpha.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/dist/augmentation.d.ts +55 -55
- package/dist/autoimage.d.ts +51 -51
- package/dist/image/converters.d.ts +78 -56
- package/dist/image/imageblockediting.d.ts +58 -58
- package/dist/image/imageediting.d.ts +29 -29
- package/dist/image/imageinlineediting.d.ts +59 -59
- package/dist/image/imageloadobserver.d.ts +40 -40
- package/dist/image/imageplaceholder.d.ts +38 -38
- package/dist/image/imagetypecommand.d.ts +39 -39
- package/dist/image/insertimagecommand.d.ts +65 -65
- package/dist/image/replaceimagesourcecommand.d.ts +46 -46
- package/dist/image/ui/utils.d.ts +21 -21
- package/dist/image/utils.d.ts +89 -56
- package/dist/image.d.ts +33 -33
- package/dist/imageblock.d.ts +33 -33
- package/dist/imagecaption/imagecaptionediting.d.ts +88 -88
- package/dist/imagecaption/imagecaptionui.d.ts +25 -25
- package/dist/imagecaption/imagecaptionutils.d.ts +37 -37
- package/dist/imagecaption/toggleimagecaptioncommand.d.ts +62 -62
- package/dist/imagecaption.d.ts +25 -25
- package/dist/imageconfig.d.ts +698 -698
- package/dist/imageinline.d.ts +33 -33
- package/dist/imageinsert/imageinsertui.d.ts +82 -82
- package/dist/imageinsert/imageinsertviaurlui.d.ts +65 -65
- package/dist/imageinsert/ui/imageinsertformview.d.ts +53 -53
- package/dist/imageinsert/ui/imageinserturlview.d.ts +61 -61
- package/dist/imageinsert.d.ts +32 -32
- package/dist/imageinsertviaurl.d.ts +30 -30
- package/dist/imageresize/imagecustomresizeui.d.ts +60 -60
- package/dist/imageresize/imageresizebuttons.d.ts +66 -66
- package/dist/imageresize/imageresizeediting.d.ts +50 -50
- package/dist/imageresize/imageresizehandles.d.ts +31 -31
- package/dist/imageresize/resizeimagecommand.d.ts +37 -37
- package/dist/imageresize/ui/imagecustomresizeformview.d.ts +125 -125
- package/dist/imageresize/utils/getselectedimageeditornodes.d.ts +17 -17
- package/dist/imageresize/utils/getselectedimagepossibleresizerange.d.ts +18 -18
- package/dist/imageresize/utils/getselectedimagewidthinunits.d.ts +20 -17
- package/dist/imageresize.d.ts +27 -27
- package/dist/imagesizeattributes.d.ts +33 -33
- package/dist/imagestyle/converters.d.ts +18 -18
- package/dist/imagestyle/imagestylecommand.d.ts +73 -63
- package/dist/imagestyle/imagestyleediting.d.ts +49 -49
- package/dist/imagestyle/imagestyleui.d.ts +55 -55
- package/dist/imagestyle/utils.d.ts +88 -88
- package/dist/imagestyle.d.ts +31 -31
- package/dist/imagetextalternative/imagetextalternativecommand.d.ts +29 -29
- package/dist/imagetextalternative/imagetextalternativeediting.d.ts +27 -27
- package/dist/imagetextalternative/imagetextalternativeui.d.ts +67 -67
- package/dist/imagetextalternative/ui/textalternativeformview.d.ts +88 -88
- package/dist/imagetextalternative.d.ts +28 -28
- package/dist/imagetoolbar.d.ts +34 -34
- package/dist/imageupload/imageuploadediting.d.ts +118 -118
- package/dist/imageupload/imageuploadprogress.d.ts +41 -41
- package/dist/imageupload/imageuploadui.d.ts +46 -46
- package/dist/imageupload/uploadimagecommand.d.ts +67 -67
- package/dist/imageupload/utils.d.ts +27 -27
- package/dist/imageupload.d.ts +31 -31
- package/dist/imageutils.d.ts +124 -124
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +68 -70
- package/dist/index.js +6032 -6533
- package/dist/index.js.map +1 -1
- package/dist/pictureediting.d.ts +87 -87
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +11 -11
- package/dist/imageresize/utils/tryparsedimensionwithunit.d.ts +0 -39
package/dist/imageinsert.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { ImageUpload } from
|
|
10
|
-
import { ImageInsertViaUrl } from
|
|
11
|
-
import { ImageInsertUI } from
|
|
6
|
+
* @module image/imageinsert
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { ImageUpload } from "./imageupload.js";
|
|
10
|
+
import { ImageInsertViaUrl } from "./imageinsertviaurl.js";
|
|
11
|
+
import { ImageInsertUI } from "./imageinsert/imageinsertui.js";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
* The image insert plugin.
|
|
14
|
+
*
|
|
15
|
+
* For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature}
|
|
16
|
+
* and {@glink features/images/images-inserting Insert images via source URL} documentation.
|
|
17
|
+
*
|
|
18
|
+
* This plugin does not do anything directly, but it loads a set of specific plugins
|
|
19
|
+
* to enable image uploading or inserting via implemented integrations:
|
|
20
|
+
*
|
|
21
|
+
* * {@link module:image/imageupload~ImageUpload}
|
|
22
|
+
* * {@link module:image/imageinsert/imageinsertui~ImageInsertUI}
|
|
23
|
+
*/
|
|
24
24
|
export declare class ImageInsert extends Plugin {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName(): "ImageInsert";
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static override get isOfficialPlugin(): true;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
static get requires(): PluginDependenciesOf<[ImageUpload, ImageInsertViaUrl, ImageInsertUI]>;
|
|
37
37
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { ImageInsertUI } from
|
|
10
|
-
import { ImageInsertViaUrlUI } from
|
|
6
|
+
* @module image/imageinsertviaurl
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { ImageInsertUI } from "./imageinsert/imageinsertui.js";
|
|
10
|
+
import { ImageInsertViaUrlUI } from "./imageinsert/imageinsertviaurlui.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
* The image insert via URL plugin.
|
|
13
|
+
*
|
|
14
|
+
* For a detailed overview, check the {@glink features/images/images-inserting
|
|
15
|
+
* Insert images via source URL} documentation.
|
|
16
|
+
*
|
|
17
|
+
* This plugin does not do anything directly, but it loads a set of specific plugins
|
|
18
|
+
* to enable image inserting via implemented integrations:
|
|
19
|
+
*
|
|
20
|
+
* * {@link module:image/imageinsert/imageinsertui~ImageInsertUI},
|
|
21
|
+
*/
|
|
22
22
|
export declare class ImageInsertViaUrl extends Plugin {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get pluginName(): "ImageInsertViaUrl";
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static override get isOfficialPlugin(): true;
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static get requires(): PluginDependenciesOf<[ImageInsertViaUrlUI, ImageInsertUI]>;
|
|
35
35
|
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin } from
|
|
9
|
-
import { ContextualBalloon } from
|
|
6
|
+
* @module image/imageresize/imagecustomresizeui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { ContextualBalloon } from "@ckeditor/ckeditor5-ui";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* The custom resize image UI plugin.
|
|
12
|
+
*
|
|
13
|
+
* The plugin uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.
|
|
14
|
+
*/
|
|
15
15
|
export declare class ImageCustomResizeUI extends Plugin {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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(): PluginDependenciesOf<[ContextualBalloon]>;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get pluginName(): "ImageCustomResizeUI";
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
static override get isOfficialPlugin(): true;
|
|
36
|
+
/**
|
|
37
|
+
* @inheritDoc
|
|
38
|
+
*/
|
|
39
|
+
override destroy(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Creates the {@link module:image/imageresize/ui/imagecustomresizeformview~ImageCustomResizeFormView}
|
|
42
|
+
* form.
|
|
43
|
+
*/
|
|
44
|
+
private _createForm;
|
|
45
|
+
/**
|
|
46
|
+
* Shows the {@link #_form} in the {@link #_balloon}.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
_showForm(unit: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Removes the {@link #_form} from the {@link #_balloon}.
|
|
53
|
+
*
|
|
54
|
+
* @param focusEditable Controls whether the editing view is focused afterwards.
|
|
55
|
+
*/
|
|
56
|
+
private _hideForm;
|
|
57
|
+
/**
|
|
58
|
+
* Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.
|
|
59
|
+
*/
|
|
60
|
+
private get _isVisible();
|
|
61
|
+
/**
|
|
62
|
+
* Returns `true` when the {@link #_form} is in the {@link #_balloon}.
|
|
63
|
+
*/
|
|
64
|
+
private get _isInBalloon();
|
|
65
65
|
}
|
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Plugin, type Editor } from
|
|
9
|
-
import { ImageResizeEditing } from
|
|
6
|
+
* @module image/imageresize/imageresizebuttons
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import { ImageResizeEditing } from "./imageresizeediting.js";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* The image resize buttons plugin.
|
|
12
|
+
*
|
|
13
|
+
* It adds a possibility to resize images using the toolbar dropdown or individual buttons, depending on the plugin configuration.
|
|
14
|
+
*/
|
|
15
15
|
export declare class ImageResizeButtons extends Plugin {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get requires(): PluginDependenciesOf<[ImageResizeEditing]>;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "ImageResizeButtons";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static override get isOfficialPlugin(): true;
|
|
28
|
+
/**
|
|
29
|
+
* The resize unit.
|
|
30
|
+
* @default '%'
|
|
31
|
+
*/
|
|
32
|
+
private readonly _resizeUnit;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
constructor(editor: Editor);
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
init(): void;
|
|
41
|
+
/**
|
|
42
|
+
* A helper function that creates a standalone button component for the plugin.
|
|
43
|
+
*
|
|
44
|
+
* @param option A model of the resize option.
|
|
45
|
+
*/
|
|
46
|
+
private _registerImageResizeButton;
|
|
47
|
+
/**
|
|
48
|
+
* A helper function that creates a dropdown component for the plugin containing all the resize options defined in
|
|
49
|
+
* the editor configuration.
|
|
50
|
+
*
|
|
51
|
+
* @param options An array of configured options.
|
|
52
|
+
*/
|
|
53
|
+
private _registerImageResizeDropdown;
|
|
54
|
+
/**
|
|
55
|
+
* A helper function for creating an option label value string.
|
|
56
|
+
*
|
|
57
|
+
* @param option A resize option object.
|
|
58
|
+
* @param forTooltip An optional flag for creating a tooltip label.
|
|
59
|
+
* @returns A user-defined label combined from the numeric value and the resize unit or the default label
|
|
60
|
+
* for reset options (`Original`).
|
|
61
|
+
*/
|
|
62
|
+
private _getOptionLabelValue;
|
|
63
|
+
/**
|
|
64
|
+
* A helper function that parses the resize options and returns list item definitions ready for use in the dropdown.
|
|
65
|
+
*
|
|
66
|
+
* @param options The resize options.
|
|
67
|
+
* @param command The resize image command.
|
|
68
|
+
* @returns Dropdown item definitions.
|
|
69
|
+
*/
|
|
70
|
+
private _getResizeDropdownListItemDefinitions;
|
|
71
71
|
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { type Editor, Plugin } from
|
|
6
|
-
import { ImageUtils } from
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { type Editor, Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
6
|
+
import { ImageUtils } from "../imageutils.js";
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
* The image resize editing feature.
|
|
9
|
+
*
|
|
10
|
+
* It adds the ability to resize each image using handles or manually by
|
|
11
|
+
* {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.
|
|
12
|
+
*/
|
|
13
13
|
export declare class ImageResizeEditing extends Plugin {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
static get requires(): PluginDependenciesOf<[ImageUtils]>;
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static get pluginName(): "ImageResizeEditing";
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
static get licenseFeatureCode(): string;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static override get isOfficialPlugin(): true;
|
|
31
|
+
/**
|
|
32
|
+
* @inheritDoc
|
|
33
|
+
*/
|
|
34
|
+
static override get isPremiumPlugin(): true;
|
|
35
|
+
/**
|
|
36
|
+
* @inheritDoc
|
|
37
|
+
*/
|
|
38
|
+
constructor(editor: Editor);
|
|
39
|
+
/**
|
|
40
|
+
* @inheritDoc
|
|
41
|
+
*/
|
|
42
|
+
init(): void;
|
|
43
|
+
/**
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
afterInit(): void;
|
|
47
|
+
private _registerSchema;
|
|
48
|
+
/**
|
|
49
|
+
* Registers image resize converters.
|
|
50
|
+
*
|
|
51
|
+
* @param imageType The type of the image.
|
|
52
|
+
*/
|
|
53
|
+
private _registerConverters;
|
|
54
54
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Plugin } from
|
|
6
|
-
import { WidgetResize } from
|
|
7
|
-
import { ImageUtils } from
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
6
|
+
import { WidgetResize } from "@ckeditor/ckeditor5-widget";
|
|
7
|
+
import { ImageUtils } from "../imageutils.js";
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
* The image resize by handles feature.
|
|
10
|
+
*
|
|
11
|
+
* It adds the ability to resize each image using handles or manually by
|
|
12
|
+
* {@link module:image/imageresize/imageresizebuttons~ImageResizeButtons} buttons.
|
|
13
|
+
*/
|
|
14
14
|
export declare class ImageResizeHandles extends Plugin {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static get requires(): PluginDependenciesOf<[WidgetResize, ImageUtils]>;
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get pluginName(): "ImageResizeHandles";
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static override get isOfficialPlugin(): true;
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
init(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Attaches the listeners responsible for creating a resizer for each image, except for images inside the HTML embed preview.
|
|
33
|
+
*/
|
|
34
|
+
private _setupResizerCreator;
|
|
35
35
|
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Command } from
|
|
6
|
+
* @module image/imageresize/resizeimagecommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "@ckeditor/ckeditor5-core";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* The resize image command. Currently, it only supports the width attribute.
|
|
11
|
+
*/
|
|
12
12
|
export declare class ResizeImageCommand extends Command {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Desired image width and height.
|
|
15
|
+
*/
|
|
16
|
+
value: undefined | null | {
|
|
17
|
+
width: string | null;
|
|
18
|
+
height: string | null;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
override refresh(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Executes the command.
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* // Sets the width to 50%:
|
|
29
|
+
* editor.execute( 'resizeImage', { width: '50%' } );
|
|
30
|
+
*
|
|
31
|
+
* // Removes the width attribute:
|
|
32
|
+
* editor.execute( 'resizeImage', { width: null } );
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param options
|
|
36
|
+
* @param options.width The new width of the image.
|
|
37
|
+
* @fires execute
|
|
38
|
+
*/
|
|
39
|
+
override execute(options: {
|
|
40
|
+
width: string | null;
|
|
41
|
+
}): void;
|
|
42
42
|
}
|