@ckeditor/ckeditor5-image 44.3.0-alpha.7 → 45.0.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/LICENSE.md +1 -1
- package/build/image.js +2 -2
- package/build/translations/af.js +1 -1
- package/build/translations/ar.js +1 -1
- package/build/translations/ast.js +1 -1
- package/build/translations/az.js +1 -1
- package/build/translations/be.js +1 -0
- 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/gu.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/hy.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/kk.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/oc.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/sl.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 -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 +9 -9
- package/dist/index-editor.css +72 -59
- package/dist/index.css +90 -79
- package/dist/index.css.map +1 -1
- package/dist/index.js +178 -120
- package/dist/index.js.map +1 -1
- 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.d.ts +8 -0
- package/dist/translations/be.js +5 -0
- package/dist/translations/be.umd.js +11 -0
- 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/lang/contexts.json +4 -2
- package/lang/translations/af.po +8 -0
- package/lang/translations/ar.po +8 -0
- package/lang/translations/ast.po +8 -0
- package/lang/translations/az.po +8 -0
- package/lang/translations/be.po +196 -0
- package/lang/translations/bg.po +8 -0
- package/lang/translations/bn.po +8 -0
- package/lang/translations/bs.po +8 -0
- package/lang/translations/ca.po +8 -0
- package/lang/translations/cs.po +8 -0
- package/lang/translations/da.po +8 -0
- package/lang/translations/de-ch.po +8 -0
- package/lang/translations/de.po +8 -0
- package/lang/translations/el.po +8 -0
- package/lang/translations/en-au.po +8 -0
- package/lang/translations/en-gb.po +8 -0
- package/lang/translations/en.po +8 -0
- package/lang/translations/eo.po +8 -0
- package/lang/translations/es-co.po +8 -0
- package/lang/translations/es.po +8 -0
- package/lang/translations/et.po +8 -0
- package/lang/translations/eu.po +8 -0
- package/lang/translations/fa.po +8 -0
- package/lang/translations/fi.po +8 -0
- package/lang/translations/fr.po +8 -0
- package/lang/translations/gl.po +8 -0
- package/lang/translations/gu.po +8 -0
- package/lang/translations/he.po +8 -0
- package/lang/translations/hi.po +8 -0
- package/lang/translations/hr.po +8 -0
- package/lang/translations/hu.po +8 -0
- package/lang/translations/hy.po +8 -0
- package/lang/translations/id.po +8 -0
- package/lang/translations/it.po +8 -0
- package/lang/translations/ja.po +8 -0
- package/lang/translations/jv.po +8 -0
- package/lang/translations/kk.po +8 -0
- package/lang/translations/km.po +8 -0
- package/lang/translations/kn.po +8 -0
- package/lang/translations/ko.po +8 -0
- package/lang/translations/ku.po +8 -0
- package/lang/translations/lt.po +8 -0
- package/lang/translations/lv.po +8 -0
- package/lang/translations/ms.po +8 -0
- package/lang/translations/nb.po +8 -0
- package/lang/translations/ne.po +8 -0
- package/lang/translations/nl.po +8 -0
- package/lang/translations/no.po +8 -0
- package/lang/translations/oc.po +8 -0
- package/lang/translations/pl.po +8 -0
- package/lang/translations/pt-br.po +8 -0
- package/lang/translations/pt.po +8 -0
- package/lang/translations/ro.po +8 -0
- package/lang/translations/ru.po +8 -0
- package/lang/translations/si.po +8 -0
- package/lang/translations/sk.po +8 -0
- package/lang/translations/sl.po +8 -0
- package/lang/translations/sq.po +8 -0
- package/lang/translations/sr-latn.po +8 -0
- package/lang/translations/sr.po +8 -0
- package/lang/translations/sv.po +8 -0
- package/lang/translations/th.po +8 -0
- package/lang/translations/ti.po +8 -0
- package/lang/translations/tk.po +8 -0
- package/lang/translations/tr.po +8 -0
- package/lang/translations/tt.po +8 -0
- package/lang/translations/ug.po +8 -0
- package/lang/translations/uk.po +8 -0
- package/lang/translations/ur.po +8 -0
- package/lang/translations/uz.po +8 -0
- package/lang/translations/vi.po +8 -0
- package/lang/translations/zh-cn.po +8 -0
- package/lang/translations/zh.po +8 -0
- package/package.json +13 -12
- package/src/autoimage.js +10 -0
- package/src/image/imagetypecommand.js +4 -0
- package/src/imagecaption/imagecaptionediting.js +7 -0
- package/src/imagecaption/imagecaptionui.js +3 -2
- package/src/imageinsert/imageinsertui.js +11 -6
- package/src/imageinsert/imageinsertviaurlui.js +7 -6
- package/src/imageinsert/ui/imageinsertformview.js +20 -0
- package/src/imageinsert/ui/imageinserturlview.js +8 -0
- package/src/imageresize/imagecustomresizeui.js +8 -5
- package/src/imageresize/imageresizebuttons.d.ts +3 -0
- package/src/imageresize/imageresizebuttons.js +21 -13
- package/src/imageresize/resizeimagecommand.d.ts +1 -1
- package/src/imageresize/ui/imagecustomresizeformview.d.ts +19 -12
- package/src/imageresize/ui/imagecustomresizeformview.js +112 -36
- package/src/imagestyle/imagestylecommand.js +10 -0
- package/src/imagestyle/imagestyleediting.js +12 -0
- package/src/imagestyle/imagestyleui.js +1 -1
- package/src/imagestyle/utils.d.ts +1 -4
- package/src/imagestyle/utils.js +16 -16
- package/src/imagetextalternative/imagetextalternativeui.js +11 -7
- package/src/imagetextalternative/ui/textalternativeformview.d.ts +17 -10
- package/src/imagetextalternative/ui/textalternativeformview.js +105 -35
- package/src/imagetoolbar.js +1 -1
- package/src/imageupload/imageuploadediting.js +17 -7
- package/src/imageupload/imageuploadprogress.js +59 -53
- package/src/imageupload/imageuploadui.js +3 -2
- package/src/imageutils.js +4 -7
- package/theme/imagecustomresizeform.css +0 -29
- package/theme/textalternativeform.css +0 -28
package/dist/index.js
CHANGED
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import { Plugin, Command
|
|
5
|
+
import { Plugin, Command } from '@ckeditor/ckeditor5-core/dist/index.js';
|
|
6
6
|
import { Clipboard, ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard/dist/index.js';
|
|
7
7
|
import { LivePosition, LiveRange, Observer, UpcastWriter, enablePlaceholder, Element } from '@ckeditor/ckeditor5-engine/dist/index.js';
|
|
8
8
|
import { Undo } from '@ckeditor/ckeditor5-undo/dist/index.js';
|
|
9
9
|
import { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';
|
|
10
10
|
import { first, DomEmitterMixin, global, FocusTracker, KeystrokeHandler, logWarning, toArray, env, CKEditorError, Collection, Rect } from '@ckeditor/ckeditor5-utils/dist/index.js';
|
|
11
11
|
import { toWidget, isWidget, findOptimalInsertionRange, Widget, toWidgetEditable, WidgetResize, calculateResizeHostAncestorWidth, WidgetToolbarRepository } from '@ckeditor/ckeditor5-widget/dist/index.js';
|
|
12
|
-
import { View, ViewCollection, FocusCycler, submitHandler, ButtonView, LabeledFieldView, createLabeledInputText, BalloonPanelView, ContextualBalloon, CssTransitionDisablerMixin, clickOutsideHandler, CollapsibleView, SplitButtonView, createDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, FileDialogButtonView, MenuBarMenuListItemFileDialogButtonView, Notification, Dialog, MenuBarMenuListItemButtonView, ViewModel, DropdownButtonView, addListToDropdown, createLabeledInputNumber, addToolbarToDropdown } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
|
12
|
+
import { View, FormRowView, ViewCollection, FocusCycler, submitHandler, ButtonView, FormHeaderView, LabeledFieldView, createLabeledInputText, BalloonPanelView, ContextualBalloon, CssTransitionDisablerMixin, clickOutsideHandler, CollapsibleView, SplitButtonView, createDropdown, MenuBarMenuView, MenuBarMenuListView, MenuBarMenuListItemView, FileDialogButtonView, MenuBarMenuListItemFileDialogButtonView, Notification, Dialog, MenuBarMenuListItemButtonView, ViewModel, DropdownButtonView, addListToDropdown, createLabeledInputNumber, addToolbarToDropdown } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
|
13
|
+
import { IconPreviousArrow, IconTextAlternative, IconImage, IconCaption, IconImageUpload, IconImageUrl, IconObjectSizeFull, IconObjectSizeCustom, IconObjectSizeLarge, IconObjectSizeMedium, IconObjectSizeSmall, IconObjectInline, IconObjectInlineRight, IconObjectInlineLeft, IconObjectCenter, IconObjectRight, IconObjectLeft, IconObjectFullWidth } from '@ckeditor/ckeditor5-icons/dist/index.js';
|
|
13
14
|
import { FileRepository } from '@ckeditor/ckeditor5-upload/dist/index.js';
|
|
14
|
-
import {
|
|
15
|
+
import { isObject, identity } from 'es-toolkit/compat';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Creates a view element representing the inline image.
|
|
@@ -623,12 +624,15 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
623
624
|
/**
|
|
624
625
|
* An input with a label.
|
|
625
626
|
*/ labeledInput;
|
|
627
|
+
/**
|
|
628
|
+
* The Back button view displayed in the header.
|
|
629
|
+
*/ backButtonView;
|
|
626
630
|
/**
|
|
627
631
|
* A button used to submit the form.
|
|
628
632
|
*/ saveButtonView;
|
|
629
633
|
/**
|
|
630
|
-
* A
|
|
631
|
-
*/
|
|
634
|
+
* A collection of child views.
|
|
635
|
+
*/ children;
|
|
632
636
|
/**
|
|
633
637
|
* A collection of views which can be focused in the form.
|
|
634
638
|
*/ _focusables;
|
|
@@ -639,14 +643,32 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
639
643
|
* @inheritDoc
|
|
640
644
|
*/ constructor(locale){
|
|
641
645
|
super(locale);
|
|
642
|
-
const t = this.locale.t;
|
|
643
646
|
this.focusTracker = new FocusTracker();
|
|
644
647
|
this.keystrokes = new KeystrokeHandler();
|
|
648
|
+
// Create buttons.
|
|
649
|
+
this.backButtonView = this._createBackButton();
|
|
650
|
+
this.saveButtonView = this._createSaveButton();
|
|
651
|
+
// Create input fields.
|
|
645
652
|
this.labeledInput = this._createLabeledInputView();
|
|
646
|
-
this.
|
|
647
|
-
|
|
648
|
-
|
|
653
|
+
this.children = this.createCollection([
|
|
654
|
+
this._createHeaderView()
|
|
655
|
+
]);
|
|
656
|
+
this.children.add(new FormRowView(locale, {
|
|
657
|
+
children: [
|
|
658
|
+
this.labeledInput,
|
|
659
|
+
this.saveButtonView
|
|
660
|
+
],
|
|
661
|
+
class: [
|
|
662
|
+
'ck-form__row_with-submit',
|
|
663
|
+
'ck-form__row_large-top-padding'
|
|
664
|
+
]
|
|
665
|
+
}));
|
|
649
666
|
this._focusables = new ViewCollection();
|
|
667
|
+
// Close the panel on esc key press when the **form has focus**.
|
|
668
|
+
this.keystrokes.set('Esc', (data, cancel)=>{
|
|
669
|
+
this.fire('cancel');
|
|
670
|
+
cancel();
|
|
671
|
+
});
|
|
650
672
|
this._focusCycler = new FocusCycler({
|
|
651
673
|
focusables: this._focusables,
|
|
652
674
|
focusTracker: this.focusTracker,
|
|
@@ -663,37 +685,35 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
663
685
|
attributes: {
|
|
664
686
|
class: [
|
|
665
687
|
'ck',
|
|
688
|
+
'ck-form',
|
|
666
689
|
'ck-text-alternative-form',
|
|
667
690
|
'ck-responsive-form'
|
|
668
691
|
],
|
|
669
692
|
// https://github.com/ckeditor/ckeditor5-image/issues/40
|
|
670
693
|
tabindex: '-1'
|
|
671
694
|
},
|
|
672
|
-
children:
|
|
673
|
-
this.labeledInput,
|
|
674
|
-
this.saveButtonView,
|
|
675
|
-
this.cancelButtonView
|
|
676
|
-
]
|
|
695
|
+
children: this.children
|
|
677
696
|
});
|
|
678
697
|
}
|
|
679
698
|
/**
|
|
680
699
|
* @inheritDoc
|
|
681
700
|
*/ render() {
|
|
682
701
|
super.render();
|
|
683
|
-
this.keystrokes.listenTo(this.element);
|
|
684
702
|
submitHandler({
|
|
685
703
|
view: this
|
|
686
704
|
});
|
|
687
|
-
[
|
|
705
|
+
const childViews = [
|
|
706
|
+
this.backButtonView,
|
|
688
707
|
this.labeledInput,
|
|
689
|
-
this.saveButtonView
|
|
690
|
-
|
|
691
|
-
|
|
708
|
+
this.saveButtonView
|
|
709
|
+
];
|
|
710
|
+
childViews.forEach((v)=>{
|
|
692
711
|
// Register the view as focusable.
|
|
693
712
|
this._focusables.add(v);
|
|
694
713
|
// Register the view in the focus tracker.
|
|
695
714
|
this.focusTracker.add(v.element);
|
|
696
715
|
});
|
|
716
|
+
this.keystrokes.listenTo(this.element);
|
|
697
717
|
}
|
|
698
718
|
/**
|
|
699
719
|
* @inheritDoc
|
|
@@ -703,29 +723,41 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
703
723
|
this.keystrokes.destroy();
|
|
704
724
|
}
|
|
705
725
|
/**
|
|
706
|
-
* Creates
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
const button = new ButtonView(this.locale);
|
|
715
|
-
button.set({
|
|
716
|
-
label,
|
|
717
|
-
icon,
|
|
726
|
+
* Creates a back button view that cancels the form.
|
|
727
|
+
*/ _createBackButton() {
|
|
728
|
+
const t = this.locale.t;
|
|
729
|
+
const backButton = new ButtonView(this.locale);
|
|
730
|
+
backButton.set({
|
|
731
|
+
class: 'ck-button-back',
|
|
732
|
+
label: t('Back'),
|
|
733
|
+
icon: IconPreviousArrow,
|
|
718
734
|
tooltip: true
|
|
719
735
|
});
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
736
|
+
backButton.delegate('execute').to(this, 'cancel');
|
|
737
|
+
return backButton;
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Creates a save button view that text alternative the image.
|
|
741
|
+
*/ _createSaveButton() {
|
|
742
|
+
const t = this.locale.t;
|
|
743
|
+
const saveButton = new ButtonView(this.locale);
|
|
744
|
+
saveButton.set({
|
|
745
|
+
label: t('Save'),
|
|
746
|
+
withText: true,
|
|
747
|
+
type: 'submit',
|
|
748
|
+
class: 'ck-button-action ck-button-bold'
|
|
724
749
|
});
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
750
|
+
return saveButton;
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Creates a header view for the form.
|
|
754
|
+
*/ _createHeaderView() {
|
|
755
|
+
const t = this.locale.t;
|
|
756
|
+
const header = new FormHeaderView(this.locale, {
|
|
757
|
+
label: t('Text Alternative')
|
|
758
|
+
});
|
|
759
|
+
header.children.add(this.backButtonView, 0);
|
|
760
|
+
return header;
|
|
729
761
|
}
|
|
730
762
|
/**
|
|
731
763
|
* Creates an input with a label.
|
|
@@ -735,6 +767,7 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
735
767
|
const t = this.locale.t;
|
|
736
768
|
const labeledInput = new LabeledFieldView(this.locale, createLabeledInputText);
|
|
737
769
|
labeledInput.label = t('Text alternative');
|
|
770
|
+
labeledInput.class = 'ck-labeled-field-view_full-width';
|
|
738
771
|
return labeledInput;
|
|
739
772
|
}
|
|
740
773
|
}
|
|
@@ -830,7 +863,7 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
830
863
|
const view = new ButtonView(locale);
|
|
831
864
|
view.set({
|
|
832
865
|
label: t('Change image text alternative'),
|
|
833
|
-
icon:
|
|
866
|
+
icon: IconTextAlternative,
|
|
834
867
|
tooltip: true
|
|
835
868
|
});
|
|
836
869
|
view.bind('isEnabled').to(command, 'isEnabled');
|
|
@@ -862,11 +895,6 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
862
895
|
this.listenTo(this._form, 'cancel', ()=>{
|
|
863
896
|
this._hideForm(true);
|
|
864
897
|
});
|
|
865
|
-
// Close the form on Esc key press.
|
|
866
|
-
this._form.keystrokes.set('Esc', (data, cancel)=>{
|
|
867
|
-
this._hideForm(true);
|
|
868
|
-
cancel();
|
|
869
|
-
});
|
|
870
898
|
// Reposition the balloon or hide the form if an image widget is no longer selected.
|
|
871
899
|
this.listenTo(editor.ui, 'update', ()=>{
|
|
872
900
|
if (!imageUtils.getClosestSelectedImageWidget(viewDocument.selection)) {
|
|
@@ -2194,7 +2222,7 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
2194
2222
|
const listView = new MenuBarMenuListView(locale);
|
|
2195
2223
|
resultView.panelView.children.add(listView);
|
|
2196
2224
|
resultView.buttonView.set({
|
|
2197
|
-
icon:
|
|
2225
|
+
icon: IconImage,
|
|
2198
2226
|
label: t('Image')
|
|
2199
2227
|
});
|
|
2200
2228
|
for (const integrationView of integrationViews){
|
|
@@ -2956,7 +2984,7 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
2956
2984
|
const command = editor.commands.get('toggleImageCaption');
|
|
2957
2985
|
const view = new ButtonView(locale);
|
|
2958
2986
|
view.set({
|
|
2959
|
-
icon:
|
|
2987
|
+
icon: IconCaption,
|
|
2960
2988
|
tooltip: true,
|
|
2961
2989
|
isToggleable: true
|
|
2962
2990
|
});
|
|
@@ -3164,7 +3192,7 @@ const IMAGE_URL_REGEXP = new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@
|
|
|
3164
3192
|
acceptedType: imageTypes.map((type)=>`image/${type}`).join(','),
|
|
3165
3193
|
allowMultipleFiles: true,
|
|
3166
3194
|
label: t('Upload from computer'),
|
|
3167
|
-
icon:
|
|
3195
|
+
icon: IconImageUpload
|
|
3168
3196
|
});
|
|
3169
3197
|
view.bind('isEnabled').to(command);
|
|
3170
3198
|
view.on('done', (evt, files)=>{
|
|
@@ -4179,7 +4207,7 @@ function getImagesFromChangeItem(editor, item) {
|
|
|
4179
4207
|
* Creates the base for various kinds of the button component provided by this feature.
|
|
4180
4208
|
*/ _createInsertUrlButton(ButtonClass) {
|
|
4181
4209
|
const button = new ButtonClass(this.editor.locale);
|
|
4182
|
-
button.icon =
|
|
4210
|
+
button.icon = IconImageUrl;
|
|
4183
4211
|
button.on('execute', ()=>{
|
|
4184
4212
|
this._showModal();
|
|
4185
4213
|
});
|
|
@@ -4252,7 +4280,7 @@ function getImagesFromChangeItem(editor, item) {
|
|
|
4252
4280
|
this._formView.imageURLInputValue = replaceImageSourceCommand.value || '';
|
|
4253
4281
|
dialog.show({
|
|
4254
4282
|
id: 'insertImageViaUrl',
|
|
4255
|
-
title:
|
|
4283
|
+
title: t('Image via URL'),
|
|
4256
4284
|
isModal: true,
|
|
4257
4285
|
content: this._formView,
|
|
4258
4286
|
actionButtons: [
|
|
@@ -4262,7 +4290,7 @@ function getImagesFromChangeItem(editor, item) {
|
|
|
4262
4290
|
onExecute: ()=>dialog.hide()
|
|
4263
4291
|
},
|
|
4264
4292
|
{
|
|
4265
|
-
label: t('
|
|
4293
|
+
label: this._imageInsertUI.isImageSelected ? t('Save') : t('Insert'),
|
|
4266
4294
|
class: 'ck-button-action',
|
|
4267
4295
|
withText: true,
|
|
4268
4296
|
onExecute: ()=>this._handleSave()
|
|
@@ -4582,11 +4610,11 @@ function getImagesFromChangeItem(editor, item) {
|
|
|
4582
4610
|
}
|
|
4583
4611
|
|
|
4584
4612
|
const RESIZE_ICONS = /* #__PURE__ */ (()=>({
|
|
4585
|
-
small:
|
|
4586
|
-
medium:
|
|
4587
|
-
large:
|
|
4588
|
-
custom:
|
|
4589
|
-
original:
|
|
4613
|
+
small: IconObjectSizeSmall,
|
|
4614
|
+
medium: IconObjectSizeMedium,
|
|
4615
|
+
large: IconObjectSizeLarge,
|
|
4616
|
+
custom: IconObjectSizeCustom,
|
|
4617
|
+
original: IconObjectSizeFull
|
|
4590
4618
|
}))();
|
|
4591
4619
|
/**
|
|
4592
4620
|
* The image resize buttons plugin.
|
|
@@ -4671,7 +4699,7 @@ const RESIZE_ICONS = /* #__PURE__ */ (()=>({
|
|
|
4671
4699
|
});
|
|
4672
4700
|
} else {
|
|
4673
4701
|
const optionValueWithUnit = value ? value + this._resizeUnit : null;
|
|
4674
|
-
button.bind('isOn').to(command, 'value', getIsOnButtonCallback(optionValueWithUnit));
|
|
4702
|
+
button.bind('isOn').to(command, 'value', command, 'isEnabled', getIsOnButtonCallback(optionValueWithUnit));
|
|
4675
4703
|
this.listenTo(button, 'execute', ()=>{
|
|
4676
4704
|
editor.execute('resizeImage', {
|
|
4677
4705
|
width: optionValueWithUnit
|
|
@@ -4807,8 +4835,8 @@ const RESIZE_ICONS = /* #__PURE__ */ (()=>({
|
|
|
4807
4835
|
}
|
|
4808
4836
|
})
|
|
4809
4837
|
};
|
|
4810
|
-
const allDropdownValues = map(
|
|
4811
|
-
definition.model.bind('isOn').to(command, 'value', getIsOnCustomButtonCallback(allDropdownValues));
|
|
4838
|
+
const allDropdownValues = Object.values(optionsWithSerializedValues).map((option)=>option.valueWithUnits);
|
|
4839
|
+
definition.model.bind('isOn').to(command, 'value', command, 'isEnabled', getIsOnCustomButtonCallback(allDropdownValues));
|
|
4812
4840
|
} else {
|
|
4813
4841
|
definition = {
|
|
4814
4842
|
type: 'button',
|
|
@@ -4821,7 +4849,7 @@ const RESIZE_ICONS = /* #__PURE__ */ (()=>({
|
|
|
4821
4849
|
icon: null
|
|
4822
4850
|
})
|
|
4823
4851
|
};
|
|
4824
|
-
definition.model.bind('isOn').to(command, 'value', getIsOnButtonCallback(option.valueWithUnits));
|
|
4852
|
+
definition.model.bind('isOn').to(command, 'value', command, 'isEnabled', getIsOnButtonCallback(option.valueWithUnits));
|
|
4825
4853
|
}
|
|
4826
4854
|
definition.model.bind('isEnabled').to(command, 'isEnabled');
|
|
4827
4855
|
itemDefinitions.add(definition);
|
|
@@ -4837,8 +4865,11 @@ const RESIZE_ICONS = /* #__PURE__ */ (()=>({
|
|
|
4837
4865
|
/**
|
|
4838
4866
|
* A helper function for setting the `isOn` state of buttons in value bindings.
|
|
4839
4867
|
*/ function getIsOnButtonCallback(value) {
|
|
4840
|
-
return (commandValue)=>{
|
|
4868
|
+
return (commandValue, isEnabled)=>{
|
|
4841
4869
|
const objectCommandValue = commandValue;
|
|
4870
|
+
if (objectCommandValue === undefined || !isEnabled) {
|
|
4871
|
+
return false;
|
|
4872
|
+
}
|
|
4842
4873
|
if (value === null && objectCommandValue === value) {
|
|
4843
4874
|
return true;
|
|
4844
4875
|
}
|
|
@@ -4848,7 +4879,7 @@ const RESIZE_ICONS = /* #__PURE__ */ (()=>({
|
|
|
4848
4879
|
/**
|
|
4849
4880
|
* A helper function for setting the `isOn` state of custom size button in value bindings.
|
|
4850
4881
|
*/ function getIsOnCustomButtonCallback(allDropdownValues) {
|
|
4851
|
-
return (commandValue)=>!allDropdownValues.some((dropdownValue)=>getIsOnButtonCallback(dropdownValue)(commandValue));
|
|
4882
|
+
return (commandValue, isEnabled)=>!allDropdownValues.some((dropdownValue)=>getIsOnButtonCallback(dropdownValue)(commandValue, isEnabled));
|
|
4852
4883
|
}
|
|
4853
4884
|
|
|
4854
4885
|
const RESIZABLE_IMAGES_CSS_SELECTOR = 'figure.image.ck-widget > img,' + 'figure.image.ck-widget > picture > img,' + 'figure.image.ck-widget > a > img,' + 'figure.image.ck-widget > a > picture > img,' + 'span.image-inline.ck-widget > img,' + 'span.image-inline.ck-widget > picture > img';
|
|
@@ -5074,14 +5105,17 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5074
5105
|
* Resize unit shortcut.
|
|
5075
5106
|
*/ unit;
|
|
5076
5107
|
/**
|
|
5077
|
-
*
|
|
5078
|
-
*/
|
|
5108
|
+
* The Back button view displayed in the header.
|
|
5109
|
+
*/ backButtonView;
|
|
5079
5110
|
/**
|
|
5080
5111
|
* A button used to submit the form.
|
|
5081
5112
|
*/ saveButtonView;
|
|
5082
5113
|
/**
|
|
5083
|
-
*
|
|
5084
|
-
*/
|
|
5114
|
+
* An input with a label.
|
|
5115
|
+
*/ labeledInput;
|
|
5116
|
+
/**
|
|
5117
|
+
* A collection of child views.
|
|
5118
|
+
*/ children;
|
|
5085
5119
|
/**
|
|
5086
5120
|
* A collection of views which can be focused in the form.
|
|
5087
5121
|
*/ _focusables;
|
|
@@ -5095,16 +5129,34 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5095
5129
|
* @inheritDoc
|
|
5096
5130
|
*/ constructor(locale, unit, validators){
|
|
5097
5131
|
super(locale);
|
|
5098
|
-
const t = this.locale.t;
|
|
5099
5132
|
this.focusTracker = new FocusTracker();
|
|
5100
5133
|
this.keystrokes = new KeystrokeHandler();
|
|
5101
5134
|
this.unit = unit;
|
|
5135
|
+
// Create buttons.
|
|
5136
|
+
this.backButtonView = this._createBackButton();
|
|
5137
|
+
this.saveButtonView = this._createSaveButton();
|
|
5138
|
+
// Create input fields.
|
|
5102
5139
|
this.labeledInput = this._createLabeledInputView();
|
|
5103
|
-
this.
|
|
5104
|
-
|
|
5105
|
-
|
|
5140
|
+
this.children = this.createCollection([
|
|
5141
|
+
this._createHeaderView()
|
|
5142
|
+
]);
|
|
5143
|
+
this.children.add(new FormRowView(locale, {
|
|
5144
|
+
children: [
|
|
5145
|
+
this.labeledInput,
|
|
5146
|
+
this.saveButtonView
|
|
5147
|
+
],
|
|
5148
|
+
class: [
|
|
5149
|
+
'ck-form__row_with-submit',
|
|
5150
|
+
'ck-form__row_large-top-padding'
|
|
5151
|
+
]
|
|
5152
|
+
}));
|
|
5106
5153
|
this._focusables = new ViewCollection();
|
|
5107
5154
|
this._validators = validators;
|
|
5155
|
+
// Close the panel on esc key press when the **form has focus**.
|
|
5156
|
+
this.keystrokes.set('Esc', (data, cancel)=>{
|
|
5157
|
+
this.fire('cancel');
|
|
5158
|
+
cancel();
|
|
5159
|
+
});
|
|
5108
5160
|
this._focusCycler = new FocusCycler({
|
|
5109
5161
|
focusables: this._focusables,
|
|
5110
5162
|
focusTracker: this.focusTracker,
|
|
@@ -5121,37 +5173,35 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5121
5173
|
attributes: {
|
|
5122
5174
|
class: [
|
|
5123
5175
|
'ck',
|
|
5176
|
+
'ck-form',
|
|
5124
5177
|
'ck-image-custom-resize-form',
|
|
5125
5178
|
'ck-responsive-form'
|
|
5126
5179
|
],
|
|
5127
5180
|
// https://github.com/ckeditor/ckeditor5-image/issues/40
|
|
5128
5181
|
tabindex: '-1'
|
|
5129
5182
|
},
|
|
5130
|
-
children:
|
|
5131
|
-
this.labeledInput,
|
|
5132
|
-
this.saveButtonView,
|
|
5133
|
-
this.cancelButtonView
|
|
5134
|
-
]
|
|
5183
|
+
children: this.children
|
|
5135
5184
|
});
|
|
5136
5185
|
}
|
|
5137
5186
|
/**
|
|
5138
5187
|
* @inheritDoc
|
|
5139
5188
|
*/ render() {
|
|
5140
5189
|
super.render();
|
|
5141
|
-
this.keystrokes.listenTo(this.element);
|
|
5142
5190
|
submitHandler({
|
|
5143
5191
|
view: this
|
|
5144
5192
|
});
|
|
5145
|
-
[
|
|
5193
|
+
const childViews = [
|
|
5194
|
+
this.backButtonView,
|
|
5146
5195
|
this.labeledInput,
|
|
5147
|
-
this.saveButtonView
|
|
5148
|
-
|
|
5149
|
-
|
|
5196
|
+
this.saveButtonView
|
|
5197
|
+
];
|
|
5198
|
+
childViews.forEach((v)=>{
|
|
5150
5199
|
// Register the view as focusable.
|
|
5151
5200
|
this._focusables.add(v);
|
|
5152
5201
|
// Register the view in the focus tracker.
|
|
5153
5202
|
this.focusTracker.add(v.element);
|
|
5154
5203
|
});
|
|
5204
|
+
this.keystrokes.listenTo(this.element);
|
|
5155
5205
|
}
|
|
5156
5206
|
/**
|
|
5157
5207
|
* @inheritDoc
|
|
@@ -5161,29 +5211,41 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5161
5211
|
this.keystrokes.destroy();
|
|
5162
5212
|
}
|
|
5163
5213
|
/**
|
|
5164
|
-
* Creates
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
const button = new ButtonView(this.locale);
|
|
5173
|
-
button.set({
|
|
5174
|
-
label,
|
|
5175
|
-
icon,
|
|
5214
|
+
* Creates a back button view that cancels the form.
|
|
5215
|
+
*/ _createBackButton() {
|
|
5216
|
+
const t = this.locale.t;
|
|
5217
|
+
const backButton = new ButtonView(this.locale);
|
|
5218
|
+
backButton.set({
|
|
5219
|
+
class: 'ck-button-back',
|
|
5220
|
+
label: t('Back'),
|
|
5221
|
+
icon: IconPreviousArrow,
|
|
5176
5222
|
tooltip: true
|
|
5177
5223
|
});
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5224
|
+
backButton.delegate('execute').to(this, 'cancel');
|
|
5225
|
+
return backButton;
|
|
5226
|
+
}
|
|
5227
|
+
/**
|
|
5228
|
+
* Creates a save button view that resize the image.
|
|
5229
|
+
*/ _createSaveButton() {
|
|
5230
|
+
const t = this.locale.t;
|
|
5231
|
+
const saveButton = new ButtonView(this.locale);
|
|
5232
|
+
saveButton.set({
|
|
5233
|
+
label: t('Save'),
|
|
5234
|
+
withText: true,
|
|
5235
|
+
type: 'submit',
|
|
5236
|
+
class: 'ck-button-action ck-button-bold'
|
|
5182
5237
|
});
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5238
|
+
return saveButton;
|
|
5239
|
+
}
|
|
5240
|
+
/**
|
|
5241
|
+
* Creates a header view for the form.
|
|
5242
|
+
*/ _createHeaderView() {
|
|
5243
|
+
const t = this.locale.t;
|
|
5244
|
+
const header = new FormHeaderView(this.locale, {
|
|
5245
|
+
label: t('Image Resize')
|
|
5246
|
+
});
|
|
5247
|
+
header.children.add(this.backButtonView, 0);
|
|
5248
|
+
return header;
|
|
5187
5249
|
}
|
|
5188
5250
|
/**
|
|
5189
5251
|
* Creates an input with a label.
|
|
@@ -5193,6 +5255,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5193
5255
|
const t = this.locale.t;
|
|
5194
5256
|
const labeledInput = new LabeledFieldView(this.locale, createLabeledInputNumber);
|
|
5195
5257
|
labeledInput.label = t('Resize image (in %0)', this.unit);
|
|
5258
|
+
labeledInput.class = 'ck-labeled-field-view_full-width';
|
|
5196
5259
|
labeledInput.fieldView.set({
|
|
5197
5260
|
step: 0.1
|
|
5198
5261
|
});
|
|
@@ -5339,11 +5402,6 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5339
5402
|
this.listenTo(this._form, 'cancel', ()=>{
|
|
5340
5403
|
this._hideForm(true);
|
|
5341
5404
|
});
|
|
5342
|
-
// Close the form on Esc key press.
|
|
5343
|
-
this._form.keystrokes.set('Esc', (data, cancel)=>{
|
|
5344
|
-
this._hideForm(true);
|
|
5345
|
-
cancel();
|
|
5346
|
-
});
|
|
5347
5405
|
// Close on click outside of balloon panel element.
|
|
5348
5406
|
clickOutsideHandler({
|
|
5349
5407
|
emitter: this._form,
|
|
@@ -5597,7 +5655,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5597
5655
|
return {
|
|
5598
5656
|
name: 'inline',
|
|
5599
5657
|
title: 'In line',
|
|
5600
|
-
icon:
|
|
5658
|
+
icon: IconObjectInline,
|
|
5601
5659
|
modelElements: [
|
|
5602
5660
|
'imageInline'
|
|
5603
5661
|
],
|
|
@@ -5609,7 +5667,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5609
5667
|
return {
|
|
5610
5668
|
name: 'alignLeft',
|
|
5611
5669
|
title: 'Left aligned image',
|
|
5612
|
-
icon:
|
|
5670
|
+
icon: IconObjectInlineLeft,
|
|
5613
5671
|
modelElements: [
|
|
5614
5672
|
'imageBlock',
|
|
5615
5673
|
'imageInline'
|
|
@@ -5622,7 +5680,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5622
5680
|
return {
|
|
5623
5681
|
name: 'alignBlockLeft',
|
|
5624
5682
|
title: 'Left aligned image',
|
|
5625
|
-
icon:
|
|
5683
|
+
icon: IconObjectLeft,
|
|
5626
5684
|
modelElements: [
|
|
5627
5685
|
'imageBlock'
|
|
5628
5686
|
],
|
|
@@ -5634,7 +5692,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5634
5692
|
return {
|
|
5635
5693
|
name: 'alignCenter',
|
|
5636
5694
|
title: 'Centered image',
|
|
5637
|
-
icon:
|
|
5695
|
+
icon: IconObjectCenter,
|
|
5638
5696
|
modelElements: [
|
|
5639
5697
|
'imageBlock'
|
|
5640
5698
|
],
|
|
@@ -5646,7 +5704,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5646
5704
|
return {
|
|
5647
5705
|
name: 'alignRight',
|
|
5648
5706
|
title: 'Right aligned image',
|
|
5649
|
-
icon:
|
|
5707
|
+
icon: IconObjectInlineRight,
|
|
5650
5708
|
modelElements: [
|
|
5651
5709
|
'imageBlock',
|
|
5652
5710
|
'imageInline'
|
|
@@ -5659,7 +5717,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5659
5717
|
return {
|
|
5660
5718
|
name: 'alignBlockRight',
|
|
5661
5719
|
title: 'Right aligned image',
|
|
5662
|
-
icon:
|
|
5720
|
+
icon: IconObjectRight,
|
|
5663
5721
|
modelElements: [
|
|
5664
5722
|
'imageBlock'
|
|
5665
5723
|
],
|
|
@@ -5671,7 +5729,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5671
5729
|
return {
|
|
5672
5730
|
name: 'block',
|
|
5673
5731
|
title: 'Centered image',
|
|
5674
|
-
icon:
|
|
5732
|
+
icon: IconObjectCenter,
|
|
5675
5733
|
modelElements: [
|
|
5676
5734
|
'imageBlock'
|
|
5677
5735
|
],
|
|
@@ -5683,7 +5741,7 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5683
5741
|
return {
|
|
5684
5742
|
name: 'side',
|
|
5685
5743
|
title: 'Side image',
|
|
5686
|
-
icon:
|
|
5744
|
+
icon: IconObjectInlineRight,
|
|
5687
5745
|
modelElements: [
|
|
5688
5746
|
'imageBlock'
|
|
5689
5747
|
],
|
|
@@ -5699,13 +5757,13 @@ const RESIZED_IMAGE_CLASS = 'image_resized';
|
|
|
5699
5757
|
*
|
|
5700
5758
|
* There are 7 default icons available: `'full'`, `'left'`, `'inlineLeft'`, `'center'`, `'right'`, `'inlineRight'`, and `'inline'`.
|
|
5701
5759
|
*/ const DEFAULT_ICONS = /* #__PURE__ */ (()=>({
|
|
5702
|
-
full:
|
|
5703
|
-
left:
|
|
5704
|
-
right:
|
|
5705
|
-
center:
|
|
5706
|
-
inlineLeft:
|
|
5707
|
-
inlineRight:
|
|
5708
|
-
inline:
|
|
5760
|
+
full: IconObjectFullWidth,
|
|
5761
|
+
left: IconObjectLeft,
|
|
5762
|
+
right: IconObjectRight,
|
|
5763
|
+
center: IconObjectCenter,
|
|
5764
|
+
inlineLeft: IconObjectInlineLeft,
|
|
5765
|
+
inlineRight: IconObjectInlineRight,
|
|
5766
|
+
inline: IconObjectInline
|
|
5709
5767
|
}))();
|
|
5710
5768
|
/**
|
|
5711
5769
|
* Default drop-downs provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#toolbar}
|