@ckeditor/ckeditor5-image 40.1.0 → 41.0.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 +25 -25
- package/LICENSE.md +1 -1
- package/build/image.js +3 -3
- 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.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/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 +3 -3
- package/lang/contexts.json +5 -0
- package/lang/translations/ar.po +21 -1
- package/lang/translations/ast.po +21 -1
- package/lang/translations/az.po +21 -1
- package/lang/translations/bg.po +21 -1
- package/lang/translations/bn.po +21 -1
- package/lang/translations/bs.po +21 -1
- package/lang/translations/ca.po +21 -1
- package/lang/translations/cs.po +21 -1
- package/lang/translations/da.po +21 -1
- package/lang/translations/de-ch.po +21 -1
- package/lang/translations/de.po +21 -1
- package/lang/translations/el.po +21 -1
- package/lang/translations/en-au.po +21 -1
- package/lang/translations/en-gb.po +21 -1
- package/lang/translations/en.po +21 -1
- package/lang/translations/eo.po +21 -1
- package/lang/translations/es.po +21 -1
- package/lang/translations/et.po +21 -1
- package/lang/translations/eu.po +21 -1
- package/lang/translations/fa.po +21 -1
- package/lang/translations/fi.po +21 -1
- package/lang/translations/fr.po +21 -1
- package/lang/translations/gl.po +21 -1
- package/lang/translations/he.po +21 -1
- package/lang/translations/hi.po +21 -1
- package/lang/translations/hr.po +21 -1
- package/lang/translations/hu.po +21 -1
- package/lang/translations/id.po +21 -1
- package/lang/translations/it.po +21 -1
- package/lang/translations/ja.po +21 -1
- package/lang/translations/jv.po +21 -1
- package/lang/translations/km.po +21 -1
- package/lang/translations/kn.po +21 -1
- package/lang/translations/ko.po +21 -1
- package/lang/translations/ku.po +21 -1
- package/lang/translations/lt.po +21 -1
- package/lang/translations/lv.po +21 -1
- package/lang/translations/ms.po +21 -1
- package/lang/translations/nb.po +21 -1
- package/lang/translations/ne.po +21 -1
- package/lang/translations/nl.po +21 -1
- package/lang/translations/no.po +21 -1
- package/lang/translations/pl.po +21 -1
- package/lang/translations/pt-br.po +21 -1
- package/lang/translations/pt.po +21 -1
- package/lang/translations/ro.po +21 -1
- package/lang/translations/ru.po +21 -1
- package/lang/translations/si.po +21 -1
- package/lang/translations/sk.po +21 -1
- package/lang/translations/sq.po +21 -1
- package/lang/translations/sr-latn.po +21 -1
- package/lang/translations/sr.po +21 -1
- package/lang/translations/sv.po +21 -1
- package/lang/translations/th.po +21 -1
- package/lang/translations/tk.po +21 -1
- package/lang/translations/tr.po +21 -1
- package/lang/translations/tt.po +21 -1
- package/lang/translations/ug.po +22 -2
- package/lang/translations/uk.po +21 -1
- package/lang/translations/ur.po +21 -1
- package/lang/translations/uz.po +21 -1
- package/lang/translations/vi.po +21 -1
- package/lang/translations/zh-cn.po +21 -1
- package/lang/translations/zh.po +21 -1
- package/package.json +4 -3
- package/src/augmentation.d.ts +1 -1
- package/src/augmentation.js +1 -1
- package/src/autoimage.d.ts +6 -6
- package/src/autoimage.js +8 -8
- package/src/image/converters.d.ts +3 -3
- package/src/image/converters.js +2 -2
- package/src/image/imageblockediting.d.ts +7 -7
- package/src/image/imageblockediting.js +11 -11
- package/src/image/imageediting.d.ts +3 -3
- package/src/image/imageediting.js +6 -6
- package/src/image/imageinlineediting.d.ts +7 -7
- package/src/image/imageinlineediting.js +11 -11
- package/src/image/imageloadobserver.d.ts +2 -2
- package/src/image/imageloadobserver.js +2 -2
- package/src/image/imageplaceholder.d.ts +3 -3
- package/src/image/imageplaceholder.js +4 -4
- package/src/image/imagetypecommand.d.ts +3 -3
- package/src/image/imagetypecommand.js +2 -2
- package/src/image/insertimagecommand.d.ts +3 -3
- package/src/image/insertimagecommand.js +3 -3
- package/src/image/replaceimagesourcecommand.d.ts +3 -3
- package/src/image/replaceimagesourcecommand.js +2 -2
- package/src/image/ui/utils.d.ts +3 -3
- package/src/image/ui/utils.js +2 -2
- package/src/image/utils.d.ts +3 -3
- package/src/image/utils.js +2 -2
- package/src/image.d.ts +4 -4
- package/src/image.js +4 -4
- package/src/imageblock.d.ts +7 -6
- package/src/imageblock.js +7 -6
- package/src/imagecaption/imagecaptionediting.d.ts +5 -5
- package/src/imagecaption/imagecaptionediting.js +7 -7
- package/src/imagecaption/imagecaptionui.d.ts +3 -3
- package/src/imagecaption/imagecaptionui.js +4 -4
- package/src/imagecaption/imagecaptionutils.d.ts +4 -4
- package/src/imagecaption/imagecaptionutils.js +3 -3
- package/src/imagecaption/toggleimagecaptioncommand.d.ts +2 -2
- package/src/imagecaption/toggleimagecaptioncommand.js +3 -3
- package/src/imagecaption.d.ts +4 -4
- package/src/imagecaption.js +4 -4
- package/src/imageconfig.d.ts +10 -14
- package/src/imageconfig.js +1 -1
- package/src/imageinline.d.ts +7 -6
- package/src/imageinline.js +7 -6
- package/src/imageinsert/imageinsertui.d.ts +39 -11
- package/src/imageinsert/imageinsertui.js +127 -94
- package/src/imageinsert/imageinsertviaurlui.d.ts +44 -0
- package/src/imageinsert/imageinsertviaurlui.js +122 -0
- package/src/imageinsert/ui/imageinsertformview.d.ts +56 -0
- package/src/imageinsert/ui/imageinsertformview.js +112 -0
- package/src/imageinsert/ui/imageinserturlview.d.ts +107 -0
- package/src/imageinsert/ui/imageinserturlview.js +156 -0
- package/src/imageinsert.d.ts +5 -5
- package/src/imageinsert.js +5 -5
- package/src/imageinsertviaurl.d.ts +5 -4
- package/src/imageinsertviaurl.js +5 -4
- package/src/imageresize/imageresizebuttons.d.ts +3 -3
- package/src/imageresize/imageresizebuttons.js +6 -6
- package/src/imageresize/imageresizeediting.d.ts +3 -3
- package/src/imageresize/imageresizeediting.js +5 -5
- package/src/imageresize/imageresizehandles.d.ts +4 -4
- package/src/imageresize/imageresizehandles.js +5 -5
- package/src/imageresize/resizeimagecommand.d.ts +2 -2
- package/src/imageresize/resizeimagecommand.js +2 -2
- package/src/imageresize.d.ts +5 -5
- package/src/imageresize.js +5 -5
- package/src/imagesizeattributes.d.ts +3 -3
- package/src/imagesizeattributes.js +4 -4
- package/src/imagestyle/converters.d.ts +4 -4
- package/src/imagestyle/converters.js +2 -2
- package/src/imagestyle/imagestylecommand.d.ts +4 -4
- package/src/imagestyle/imagestylecommand.js +2 -2
- package/src/imagestyle/imagestyleediting.d.ts +4 -4
- package/src/imagestyle/imagestyleediting.js +6 -6
- package/src/imagestyle/imagestyleui.d.ts +3 -3
- package/src/imagestyle/imagestyleui.js +5 -5
- package/src/imagestyle/utils.d.ts +3 -3
- package/src/imagestyle/utils.js +3 -3
- package/src/imagestyle.d.ts +4 -4
- package/src/imagestyle.js +4 -4
- package/src/imagetextalternative/imagetextalternativecommand.d.ts +2 -2
- package/src/imagetextalternative/imagetextalternativecommand.js +2 -2
- package/src/imagetextalternative/imagetextalternativeediting.d.ts +3 -3
- package/src/imagetextalternative/imagetextalternativeediting.js +4 -4
- package/src/imagetextalternative/imagetextalternativeui.d.ts +3 -3
- package/src/imagetextalternative/imagetextalternativeui.js +5 -5
- package/src/imagetextalternative/ui/textalternativeformview.d.ts +22 -4
- package/src/imagetextalternative/ui/textalternativeformview.js +4 -4
- package/src/imagetextalternative.d.ts +4 -4
- package/src/imagetextalternative.js +4 -4
- package/src/imagetoolbar.d.ts +4 -4
- package/src/imagetoolbar.js +4 -4
- package/src/imageupload/imageuploadediting.d.ts +7 -7
- package/src/imageupload/imageuploadediting.js +11 -11
- package/src/imageupload/imageuploadprogress.d.ts +2 -2
- package/src/imageupload/imageuploadprogress.js +3 -3
- package/src/imageupload/imageuploadui.d.ts +2 -2
- package/src/imageupload/imageuploadui.js +34 -10
- package/src/imageupload/uploadimagecommand.d.ts +3 -3
- package/src/imageupload/uploadimagecommand.js +4 -4
- package/src/imageupload/utils.d.ts +3 -3
- package/src/imageupload/utils.js +2 -2
- package/src/imageupload.d.ts +5 -5
- package/src/imageupload.js +5 -5
- package/src/imageutils.d.ts +3 -3
- package/src/imageutils.js +5 -5
- package/src/index.d.ts +42 -42
- package/src/index.js +33 -33
- package/src/pictureediting.d.ts +4 -4
- package/src/pictureediting.js +5 -5
- package/theme/image.css +1 -1
- package/theme/imagecaption.css +1 -1
- package/theme/imageinsert.css +6 -18
- package/theme/imageplaceholder.css +1 -1
- package/theme/imageresize.css +1 -1
- package/theme/imagestyle.css +1 -1
- package/theme/imageuploadicon.css +1 -1
- package/theme/imageuploadloader.css +1 -1
- package/theme/imageuploadprogress.css +1 -1
- package/theme/textalternativeform.css +1 -1
- package/src/imageinsert/ui/imageinsertformrowview.d.ts +0 -61
- package/src/imageinsert/ui/imageinsertformrowview.js +0 -54
- package/src/imageinsert/ui/imageinsertpanelview.d.ts +0 -106
- package/src/imageinsert/ui/imageinsertpanelview.js +0 -161
- package/src/imageinsert/utils.d.ts +0 -25
- package/src/imageinsert/utils.js +0 -58
- package/theme/imageinsertformrowview.css +0 -36
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
import { ButtonView, View, FocusCycler, LabeledFieldView, type InputTextView } from 'ckeditor5/src/ui.js';
|
|
6
|
+
import { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* The insert an image via URL view.
|
|
9
|
+
*
|
|
10
|
+
* See {@link module:image/imageinsert/imageinsertviaurlui~ImageInsertViaUrlUI}.
|
|
11
|
+
*/
|
|
12
|
+
export default class ImageInsertUrlView extends View {
|
|
13
|
+
/**
|
|
14
|
+
* The URL input field view.
|
|
15
|
+
*/
|
|
16
|
+
urlInputView: LabeledFieldView<InputTextView>;
|
|
17
|
+
/**
|
|
18
|
+
* The "insert/update" button view.
|
|
19
|
+
*/
|
|
20
|
+
insertButtonView: ButtonView;
|
|
21
|
+
/**
|
|
22
|
+
* The "cancel" button view.
|
|
23
|
+
*/
|
|
24
|
+
cancelButtonView: ButtonView;
|
|
25
|
+
/**
|
|
26
|
+
* The value of the URL input.
|
|
27
|
+
*
|
|
28
|
+
* @observable
|
|
29
|
+
*/
|
|
30
|
+
imageURLInputValue: string;
|
|
31
|
+
/**
|
|
32
|
+
* Observable property used to alter labels while some image is selected and when it is not.
|
|
33
|
+
*
|
|
34
|
+
* @observable
|
|
35
|
+
*/
|
|
36
|
+
isImageSelected: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Observable property indicating whether the form interactive elements should be enabled.
|
|
39
|
+
*
|
|
40
|
+
* @observable
|
|
41
|
+
*/
|
|
42
|
+
isEnabled: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Tracks information about DOM focus in the form.
|
|
45
|
+
*/
|
|
46
|
+
readonly focusTracker: FocusTracker;
|
|
47
|
+
/**
|
|
48
|
+
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
49
|
+
*/
|
|
50
|
+
readonly keystrokes: KeystrokeHandler;
|
|
51
|
+
/**
|
|
52
|
+
* Helps cycling over {@link #_focusables} in the form.
|
|
53
|
+
*/
|
|
54
|
+
readonly focusCycler: FocusCycler;
|
|
55
|
+
/**
|
|
56
|
+
* A collection of views that can be focused in the form.
|
|
57
|
+
*/
|
|
58
|
+
private readonly _focusables;
|
|
59
|
+
/**
|
|
60
|
+
* Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.
|
|
61
|
+
*
|
|
62
|
+
* @param locale The localization services instance.
|
|
63
|
+
*/
|
|
64
|
+
constructor(locale: Locale);
|
|
65
|
+
/**
|
|
66
|
+
* @inheritDoc
|
|
67
|
+
*/
|
|
68
|
+
render(): void;
|
|
69
|
+
/**
|
|
70
|
+
* @inheritDoc
|
|
71
|
+
*/
|
|
72
|
+
destroy(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Creates the {@link #urlInputView}.
|
|
75
|
+
*/
|
|
76
|
+
private _createUrlInputView;
|
|
77
|
+
/**
|
|
78
|
+
* Creates the {@link #insertButtonView}.
|
|
79
|
+
*/
|
|
80
|
+
private _createInsertButton;
|
|
81
|
+
/**
|
|
82
|
+
* Creates the {@link #cancelButtonView}.
|
|
83
|
+
*/
|
|
84
|
+
private _createCancelButton;
|
|
85
|
+
/**
|
|
86
|
+
* Focuses the view.
|
|
87
|
+
*/
|
|
88
|
+
focus(direction: 1 | -1): void;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Fired when the form view is submitted.
|
|
92
|
+
*
|
|
93
|
+
* @eventName ~ImageInsertUrlView#submit
|
|
94
|
+
*/
|
|
95
|
+
export type ImageInsertUrlViewSubmitEvent = {
|
|
96
|
+
name: 'submit';
|
|
97
|
+
args: [];
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Fired when the form view is canceled.
|
|
101
|
+
*
|
|
102
|
+
* @eventName ~ImageInsertUrlView#cancel
|
|
103
|
+
*/
|
|
104
|
+
export type ImageInsertUrlViewCancelEvent = {
|
|
105
|
+
name: 'cancel';
|
|
106
|
+
args: [];
|
|
107
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
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/imageinsert/ui/imageinserturlview
|
|
7
|
+
*/
|
|
8
|
+
import { icons } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ButtonView, View, ViewCollection, FocusCycler, LabeledFieldView, createLabeledInputText } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils.js';
|
|
11
|
+
/**
|
|
12
|
+
* The insert an image via URL view.
|
|
13
|
+
*
|
|
14
|
+
* See {@link module:image/imageinsert/imageinsertviaurlui~ImageInsertViaUrlUI}.
|
|
15
|
+
*/
|
|
16
|
+
export default class ImageInsertUrlView extends View {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a view for the dropdown panel of {@link module:image/imageinsert/imageinsertui~ImageInsertUI}.
|
|
19
|
+
*
|
|
20
|
+
* @param locale The localization services instance.
|
|
21
|
+
*/
|
|
22
|
+
constructor(locale) {
|
|
23
|
+
super(locale);
|
|
24
|
+
this.set('imageURLInputValue', '');
|
|
25
|
+
this.set('isImageSelected', false);
|
|
26
|
+
this.set('isEnabled', true);
|
|
27
|
+
this.focusTracker = new FocusTracker();
|
|
28
|
+
this.keystrokes = new KeystrokeHandler();
|
|
29
|
+
this._focusables = new ViewCollection();
|
|
30
|
+
this.focusCycler = new FocusCycler({
|
|
31
|
+
focusables: this._focusables,
|
|
32
|
+
focusTracker: this.focusTracker,
|
|
33
|
+
keystrokeHandler: this.keystrokes,
|
|
34
|
+
actions: {
|
|
35
|
+
// Navigate form fields backwards using the Shift + Tab keystroke.
|
|
36
|
+
focusPrevious: 'shift + tab',
|
|
37
|
+
// Navigate form fields forwards using the Tab key.
|
|
38
|
+
focusNext: 'tab'
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
this.urlInputView = this._createUrlInputView();
|
|
42
|
+
this.insertButtonView = this._createInsertButton();
|
|
43
|
+
this.cancelButtonView = this._createCancelButton();
|
|
44
|
+
this._focusables.addMany([
|
|
45
|
+
this.urlInputView,
|
|
46
|
+
this.insertButtonView,
|
|
47
|
+
this.cancelButtonView
|
|
48
|
+
]);
|
|
49
|
+
this.setTemplate({
|
|
50
|
+
tag: 'div',
|
|
51
|
+
attributes: {
|
|
52
|
+
class: [
|
|
53
|
+
'ck',
|
|
54
|
+
'ck-image-insert-url'
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
this.urlInputView,
|
|
59
|
+
{
|
|
60
|
+
tag: 'div',
|
|
61
|
+
attributes: {
|
|
62
|
+
class: [
|
|
63
|
+
'ck',
|
|
64
|
+
'ck-image-insert-url__action-row'
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
children: [
|
|
68
|
+
this.insertButtonView,
|
|
69
|
+
this.cancelButtonView
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @inheritDoc
|
|
77
|
+
*/
|
|
78
|
+
render() {
|
|
79
|
+
super.render();
|
|
80
|
+
for (const view of this._focusables) {
|
|
81
|
+
this.focusTracker.add(view.element);
|
|
82
|
+
}
|
|
83
|
+
// Start listening for the keystrokes coming from #element.
|
|
84
|
+
this.keystrokes.listenTo(this.element);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @inheritDoc
|
|
88
|
+
*/
|
|
89
|
+
destroy() {
|
|
90
|
+
super.destroy();
|
|
91
|
+
this.focusTracker.destroy();
|
|
92
|
+
this.keystrokes.destroy();
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Creates the {@link #urlInputView}.
|
|
96
|
+
*/
|
|
97
|
+
_createUrlInputView() {
|
|
98
|
+
const locale = this.locale;
|
|
99
|
+
const t = locale.t;
|
|
100
|
+
const urlInputView = new LabeledFieldView(locale, createLabeledInputText);
|
|
101
|
+
urlInputView.bind('label').to(this, 'isImageSelected', value => value ? t('Update image URL') : t('Insert image via URL'));
|
|
102
|
+
urlInputView.bind('isEnabled').to(this);
|
|
103
|
+
urlInputView.fieldView.placeholder = 'https://example.com/image.png';
|
|
104
|
+
urlInputView.fieldView.bind('value').to(this, 'imageURLInputValue', (value) => value || '');
|
|
105
|
+
urlInputView.fieldView.on('input', () => {
|
|
106
|
+
this.imageURLInputValue = urlInputView.fieldView.element.value.trim();
|
|
107
|
+
});
|
|
108
|
+
return urlInputView;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Creates the {@link #insertButtonView}.
|
|
112
|
+
*/
|
|
113
|
+
_createInsertButton() {
|
|
114
|
+
const locale = this.locale;
|
|
115
|
+
const t = locale.t;
|
|
116
|
+
const insertButtonView = new ButtonView(locale);
|
|
117
|
+
insertButtonView.set({
|
|
118
|
+
icon: icons.check,
|
|
119
|
+
class: 'ck-button-save',
|
|
120
|
+
type: 'submit',
|
|
121
|
+
withText: true
|
|
122
|
+
});
|
|
123
|
+
insertButtonView.bind('label').to(this, 'isImageSelected', value => value ? t('Update') : t('Insert'));
|
|
124
|
+
insertButtonView.bind('isEnabled').to(this, 'imageURLInputValue', this, 'isEnabled', (...values) => values.every(value => value));
|
|
125
|
+
insertButtonView.delegate('execute').to(this, 'submit');
|
|
126
|
+
return insertButtonView;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Creates the {@link #cancelButtonView}.
|
|
130
|
+
*/
|
|
131
|
+
_createCancelButton() {
|
|
132
|
+
const locale = this.locale;
|
|
133
|
+
const t = locale.t;
|
|
134
|
+
const cancelButtonView = new ButtonView(locale);
|
|
135
|
+
cancelButtonView.set({
|
|
136
|
+
label: t('Cancel'),
|
|
137
|
+
icon: icons.cancel,
|
|
138
|
+
class: 'ck-button-cancel',
|
|
139
|
+
withText: true
|
|
140
|
+
});
|
|
141
|
+
cancelButtonView.bind('isEnabled').to(this);
|
|
142
|
+
cancelButtonView.delegate('execute').to(this, 'cancel');
|
|
143
|
+
return cancelButtonView;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Focuses the view.
|
|
147
|
+
*/
|
|
148
|
+
focus(direction) {
|
|
149
|
+
if (direction === -1) {
|
|
150
|
+
this.focusCycler.focusLast();
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
this.focusCycler.focusFirst();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
package/src/imageinsert.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageinsert
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageUpload from './imageupload';
|
|
10
|
-
import ImageInsertViaUrl from './imageinsertviaurl';
|
|
11
|
-
import ImageInsertUI from './imageinsert/imageinsertui';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageUpload from './imageupload.js';
|
|
10
|
+
import ImageInsertViaUrl from './imageinsertviaurl.js';
|
|
11
|
+
import ImageInsertUI from './imageinsert/imageinsertui.js';
|
|
12
12
|
/**
|
|
13
13
|
* The image insert plugin.
|
|
14
14
|
*
|
package/src/imageinsert.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageinsert
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageUpload from './imageupload';
|
|
10
|
-
import ImageInsertViaUrl from './imageinsertviaurl';
|
|
11
|
-
import ImageInsertUI from './imageinsert/imageinsertui';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageUpload from './imageupload.js';
|
|
10
|
+
import ImageInsertViaUrl from './imageinsertviaurl.js';
|
|
11
|
+
import ImageInsertUI from './imageinsert/imageinsertui.js';
|
|
12
12
|
/**
|
|
13
13
|
* The image insert plugin.
|
|
14
14
|
*
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageinsertviaurl
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageInsertUI from './imageinsert/imageinsertui';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageInsertUI from './imageinsert/imageinsertui.js';
|
|
10
|
+
import ImageInsertViaUrlUI from './imageinsert/imageinsertviaurlui.js';
|
|
10
11
|
/**
|
|
11
12
|
* The image insert via URL plugin.
|
|
12
13
|
*
|
|
@@ -26,5 +27,5 @@ export default class ImageInsertViaUrl extends Plugin {
|
|
|
26
27
|
/**
|
|
27
28
|
* @inheritDoc
|
|
28
29
|
*/
|
|
29
|
-
static get requires(): readonly [typeof ImageInsertUI];
|
|
30
|
+
static get requires(): readonly [typeof ImageInsertViaUrlUI, typeof ImageInsertUI];
|
|
30
31
|
}
|
package/src/imageinsertviaurl.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageinsertviaurl
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageInsertUI from './imageinsert/imageinsertui';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageInsertUI from './imageinsert/imageinsertui.js';
|
|
10
|
+
import ImageInsertViaUrlUI from './imageinsert/imageinsertviaurlui.js';
|
|
10
11
|
/**
|
|
11
12
|
* The image insert via URL plugin.
|
|
12
13
|
*
|
|
@@ -29,6 +30,6 @@ export default class ImageInsertViaUrl extends Plugin {
|
|
|
29
30
|
* @inheritDoc
|
|
30
31
|
*/
|
|
31
32
|
static get requires() {
|
|
32
|
-
return [ImageInsertUI];
|
|
33
|
+
return [ImageInsertViaUrlUI, ImageInsertUI];
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageresize/imageresizebuttons
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin, type Editor } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageResizeEditing from './imageresizeediting';
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageResizeEditing from './imageresizeediting.js';
|
|
10
10
|
/**
|
|
11
11
|
* The image resize buttons plugin.
|
|
12
12
|
*
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageresize/imageresizebuttons
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin, icons } from 'ckeditor5/src/core';
|
|
9
|
-
import { ButtonView, DropdownButtonView,
|
|
10
|
-
import { CKEditorError, Collection } from 'ckeditor5/src/utils';
|
|
11
|
-
import ImageResizeEditing from './imageresizeediting';
|
|
8
|
+
import { Plugin, icons } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ButtonView, DropdownButtonView, ViewModel, createDropdown, addListToDropdown } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import { CKEditorError, Collection } from 'ckeditor5/src/utils.js';
|
|
11
|
+
import ImageResizeEditing from './imageresizeediting.js';
|
|
12
12
|
const RESIZE_ICONS = {
|
|
13
13
|
small: icons.objectSizeSmall,
|
|
14
14
|
medium: icons.objectSizeMedium,
|
|
@@ -188,7 +188,7 @@ export default class ImageResizeButtons extends Plugin {
|
|
|
188
188
|
const optionValueWithUnit = option.value ? option.value + this._resizeUnit : null;
|
|
189
189
|
const definition = {
|
|
190
190
|
type: 'button',
|
|
191
|
-
model: new
|
|
191
|
+
model: new ViewModel({
|
|
192
192
|
commandName: 'resizeImage',
|
|
193
193
|
commandValue: optionValueWithUnit,
|
|
194
194
|
label: this._getOptionLabelValue(option),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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 Editor, Plugin } from 'ckeditor5/src/core';
|
|
6
|
-
import ImageUtils from '../imageutils';
|
|
5
|
+
import { type Editor, Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import ImageUtils from '../imageutils.js';
|
|
7
7
|
/**
|
|
8
8
|
* The image resize editing feature.
|
|
9
9
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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 { Plugin } from 'ckeditor5/src/core';
|
|
6
|
-
import ImageUtils from '../imageutils';
|
|
7
|
-
import ResizeImageCommand from './resizeimagecommand';
|
|
8
|
-
import { widthAndHeightStylesAreBothSet } from '../image/utils';
|
|
5
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import ImageUtils from '../imageutils.js';
|
|
7
|
+
import ResizeImageCommand from './resizeimagecommand.js';
|
|
8
|
+
import { widthAndHeightStylesAreBothSet } from '../image/utils.js';
|
|
9
9
|
/**
|
|
10
10
|
* The image resize editing feature.
|
|
11
11
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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 { Plugin } from 'ckeditor5/src/core';
|
|
6
|
-
import { WidgetResize } from 'ckeditor5/src/widget';
|
|
7
|
-
import ImageUtils from '../imageutils';
|
|
5
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import { WidgetResize } from 'ckeditor5/src/widget.js';
|
|
7
|
+
import ImageUtils from '../imageutils.js';
|
|
8
8
|
/**
|
|
9
9
|
* The image resize by handles feature.
|
|
10
10
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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 { Plugin } from 'ckeditor5/src/core';
|
|
6
|
-
import { WidgetResize } from 'ckeditor5/src/widget';
|
|
7
|
-
import ImageUtils from '../imageutils';
|
|
8
|
-
import ImageLoadObserver from '../image/imageloadobserver';
|
|
5
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
6
|
+
import { WidgetResize } from 'ckeditor5/src/widget.js';
|
|
7
|
+
import ImageUtils from '../imageutils.js';
|
|
8
|
+
import ImageLoadObserver from '../image/imageloadobserver.js';
|
|
9
9
|
const RESIZABLE_IMAGES_CSS_SELECTOR = 'figure.image.ck-widget > img,' +
|
|
10
10
|
'figure.image.ck-widget > picture > img,' +
|
|
11
11
|
'figure.image.ck-widget > a > img,' +
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageresize/resizeimagecommand
|
|
7
7
|
*/
|
|
8
|
-
import { Command } from 'ckeditor5/src/core';
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
9
|
/**
|
|
10
10
|
* The resize image command. Currently, it only supports the width attribute.
|
|
11
11
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageresize/resizeimagecommand
|
|
7
7
|
*/
|
|
8
|
-
import { Command } from 'ckeditor5/src/core';
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
9
|
/**
|
|
10
10
|
* The resize image command. Currently, it only supports the width attribute.
|
|
11
11
|
*/
|
package/src/imageresize.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageresize
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageResizeButtons from './imageresize/imageresizebuttons';
|
|
10
|
-
import ImageResizeEditing from './imageresize/imageresizeediting';
|
|
11
|
-
import ImageResizeHandles from './imageresize/imageresizehandles';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageResizeButtons from './imageresize/imageresizebuttons.js';
|
|
10
|
+
import ImageResizeEditing from './imageresize/imageresizeediting.js';
|
|
11
|
+
import ImageResizeHandles from './imageresize/imageresizehandles.js';
|
|
12
12
|
import '../theme/imageresize.css';
|
|
13
13
|
/**
|
|
14
14
|
* The image resize plugin.
|
package/src/imageresize.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imageresize
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageResizeButtons from './imageresize/imageresizebuttons';
|
|
10
|
-
import ImageResizeEditing from './imageresize/imageresizeediting';
|
|
11
|
-
import ImageResizeHandles from './imageresize/imageresizehandles';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageResizeButtons from './imageresize/imageresizebuttons.js';
|
|
10
|
+
import ImageResizeEditing from './imageresize/imageresizeediting.js';
|
|
11
|
+
import ImageResizeHandles from './imageresize/imageresizehandles.js';
|
|
12
12
|
import '../theme/imageresize.css';
|
|
13
13
|
/**
|
|
14
14
|
* The image resize plugin.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imagesizeattributes
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageUtils from './imageutils';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageUtils from './imageutils.js';
|
|
10
10
|
/**
|
|
11
11
|
* This plugin enables `width` and `height` attributes in inline and block image elements.
|
|
12
12
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imagesizeattributes
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageUtils from './imageutils';
|
|
10
|
-
import { widthAndHeightStylesAreBothSet, getSizeValueIfInPx } from './image/utils';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageUtils from './imageutils.js';
|
|
10
|
+
import { widthAndHeightStylesAreBothSet, getSizeValueIfInPx } from './image/utils.js';
|
|
11
11
|
/**
|
|
12
12
|
* This plugin enables `width` and `height` attributes in inline and block image elements.
|
|
13
13
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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 { DowncastAttributeEvent, UpcastElementEvent } from 'ckeditor5/src/engine';
|
|
6
|
-
import { type GetCallback } from 'ckeditor5/src/utils';
|
|
7
|
-
import type { ImageStyleOptionDefinition } from '../imageconfig';
|
|
5
|
+
import type { DowncastAttributeEvent, UpcastElementEvent } from 'ckeditor5/src/engine.js';
|
|
6
|
+
import { type GetCallback } from 'ckeditor5/src/utils.js';
|
|
7
|
+
import type { ImageStyleOptionDefinition } from '../imageconfig.js';
|
|
8
8
|
/**
|
|
9
9
|
* @module image/imagestyle/converters
|
|
10
10
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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 { first } from 'ckeditor5/src/utils';
|
|
5
|
+
import { first } from 'ckeditor5/src/utils.js';
|
|
6
6
|
/**
|
|
7
7
|
* @module image/imagestyle/converters
|
|
8
8
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imagestyle/imagestylecommand
|
|
7
7
|
*/
|
|
8
|
-
import type { Element } from 'ckeditor5/src/engine';
|
|
9
|
-
import { Command, type Editor } from 'ckeditor5/src/core';
|
|
10
|
-
import type { ImageStyleOptionDefinition } from '../imageconfig';
|
|
8
|
+
import type { Element } from 'ckeditor5/src/engine.js';
|
|
9
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
import type { ImageStyleOptionDefinition } from '../imageconfig.js';
|
|
11
11
|
/**
|
|
12
12
|
* The image style command. It is used to apply {@link module:image/imageconfig~ImageStyleConfig#options image style option}
|
|
13
13
|
* to a selected image.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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 { Command } from 'ckeditor5/src/core';
|
|
5
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
6
6
|
/**
|
|
7
7
|
* The image style command. It is used to apply {@link module:image/imageconfig~ImageStyleConfig#options image style option}
|
|
8
8
|
* to a selected image.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
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
5
|
/**
|
|
6
6
|
* @module image/imagestyle/imagestyleediting
|
|
7
7
|
*/
|
|
8
|
-
import { Plugin } from 'ckeditor5/src/core';
|
|
9
|
-
import ImageUtils from '../imageutils';
|
|
10
|
-
import type { ImageStyleOptionDefinition } from '../imageconfig';
|
|
8
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import ImageUtils from '../imageutils.js';
|
|
10
|
+
import type { ImageStyleOptionDefinition } from '../imageconfig.js';
|
|
11
11
|
/**
|
|
12
12
|
* The image style engine plugin. It sets the default configuration, creates converters and registers
|
|
13
13
|
* {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}.
|