@ckeditor/ckeditor5-image 29.2.0 → 32.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/LICENSE.md +2 -2
- package/build/image.js +3 -3
- package/build/translations/bs.js +1 -0
- package/build/translations/cs.js +1 -1
- package/build/translations/es.js +1 -1
- package/build/translations/id.js +1 -1
- package/build/translations/nl.js +1 -1
- package/build/translations/pt-br.js +1 -1
- package/build/translations/sr-latn.js +1 -1
- package/build/translations/sr.js +1 -1
- package/build/translations/uz.js +1 -0
- package/build/translations/zh-cn.js +1 -1
- package/build/translations/zh.js +1 -1
- package/ckeditor5-metadata.json +1 -0
- package/lang/translations/ar.po +1 -1
- package/lang/translations/ast.po +1 -1
- package/lang/translations/az.po +1 -1
- package/lang/translations/bg.po +1 -1
- package/lang/translations/bs.po +113 -0
- package/lang/translations/cs.po +4 -4
- package/lang/translations/da.po +1 -1
- package/lang/translations/de-ch.po +1 -1
- package/lang/translations/de.po +1 -1
- package/lang/translations/el.po +1 -1
- package/lang/translations/en-au.po +1 -1
- package/lang/translations/en-gb.po +1 -1
- package/lang/translations/en.po +1 -1
- package/lang/translations/eo.po +1 -1
- package/lang/translations/es.po +6 -6
- package/lang/translations/et.po +1 -1
- package/lang/translations/eu.po +1 -1
- package/lang/translations/fa.po +1 -1
- package/lang/translations/fi.po +1 -1
- package/lang/translations/fr.po +1 -1
- package/lang/translations/gl.po +1 -1
- package/lang/translations/he.po +1 -1
- package/lang/translations/hi.po +1 -1
- package/lang/translations/hr.po +1 -1
- package/lang/translations/hu.po +1 -1
- package/lang/translations/id.po +4 -4
- package/lang/translations/it.po +1 -1
- package/lang/translations/ja.po +1 -1
- package/lang/translations/km.po +1 -1
- package/lang/translations/kn.po +1 -1
- package/lang/translations/ko.po +1 -1
- package/lang/translations/ku.po +1 -1
- package/lang/translations/lt.po +1 -1
- package/lang/translations/lv.po +1 -1
- package/lang/translations/nb.po +1 -1
- package/lang/translations/ne.po +1 -1
- package/lang/translations/nl.po +3 -3
- package/lang/translations/no.po +1 -1
- package/lang/translations/pl.po +1 -1
- package/lang/translations/pt-br.po +6 -6
- package/lang/translations/pt.po +1 -1
- package/lang/translations/ro.po +1 -1
- package/lang/translations/ru.po +1 -1
- package/lang/translations/si.po +1 -1
- package/lang/translations/sk.po +1 -1
- package/lang/translations/sq.po +1 -1
- package/lang/translations/sr-latn.po +4 -4
- package/lang/translations/sr.po +4 -4
- package/lang/translations/sv.po +1 -1
- package/lang/translations/th.po +1 -1
- package/lang/translations/tk.po +1 -1
- package/lang/translations/tr.po +1 -1
- package/lang/translations/ug.po +1 -1
- package/lang/translations/uk.po +1 -1
- package/lang/translations/uz.po +113 -0
- package/lang/translations/vi.po +1 -1
- package/lang/translations/zh-cn.po +2 -2
- package/lang/translations/zh.po +5 -5
- package/package.json +34 -34
- package/src/autoimage.js +5 -2
- package/src/image/converters.js +9 -9
- package/src/image/imageblockediting.js +5 -2
- package/src/image/imageediting.js +1 -1
- package/src/image/imageinlineediting.js +6 -2
- package/src/image/imageloadobserver.js +1 -1
- package/src/image/imagetypecommand.js +1 -1
- package/src/image/insertimagecommand.js +1 -1
- package/src/image/ui/utils.js +3 -2
- package/src/image/utils.js +5 -10
- package/src/image.js +1 -1
- package/src/imageblock.js +1 -1
- package/src/imagecaption/imagecaptionediting.js +3 -13
- package/src/imagecaption/imagecaptionui.js +1 -1
- package/src/imagecaption/toggleimagecaptioncommand.js +1 -1
- package/src/imagecaption/utils.js +1 -1
- package/src/imagecaption.js +1 -1
- package/src/imageinline.js +1 -1
- package/src/imageinsert/imageinsertui.js +1 -1
- package/src/imageinsert/ui/imageinsertformrowview.js +1 -1
- package/src/imageinsert/ui/imageinsertpanelview.js +11 -1
- package/src/imageinsert/utils.js +1 -1
- package/src/imageinsert.js +1 -1
- package/src/imageresize/imageresizebuttons.js +1 -1
- package/src/imageresize/imageresizeediting.js +1 -1
- package/src/imageresize/imageresizehandles.js +1 -1
- package/src/imageresize/resizeimagecommand.js +1 -1
- package/src/imageresize.js +1 -1
- package/src/imagestyle/converters.js +3 -2
- package/src/imagestyle/imagestylecommand.js +1 -1
- package/src/imagestyle/imagestyleediting.js +1 -1
- package/src/imagestyle/imagestyleui.js +1 -1
- package/src/imagestyle/utils.js +1 -1
- package/src/imagestyle.js +1 -1
- package/src/imagetextalternative/imagetextalternativecommand.js +1 -1
- package/src/imagetextalternative/imagetextalternativeediting.js +1 -1
- package/src/imagetextalternative/imagetextalternativeui.js +1 -1
- package/src/imagetextalternative/ui/textalternativeformview.js +11 -1
- package/src/imagetextalternative.js +1 -1
- package/src/imagetoolbar.js +1 -1
- package/src/imageupload/imageuploadediting.js +7 -7
- package/src/imageupload/imageuploadprogress.js +4 -4
- package/src/imageupload/imageuploadui.js +1 -1
- package/src/imageupload/uploadimagecommand.js +1 -1
- package/src/imageupload/utils.js +1 -1
- package/src/imageupload.js +1 -1
- package/src/imageutils.js +1 -1
- package/src/index.js +1 -1
- package/src/pictureediting.js +1 -1
- package/theme/image.css +1 -1
- package/theme/imagecaption.css +1 -1
- package/theme/imageinsert.css +1 -1
- package/theme/imageinsertformrowview.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/CHANGELOG.md +0 -423
- package/theme/icons/image_placeholder.svg +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Uzbek (https://www.transifex.com/ckeditor/teams/11143/uz/)\n"
|
|
16
|
+
"Language: uz\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "The label for the image widget."
|
|
20
|
+
msgid "image widget"
|
|
21
|
+
msgstr "Tasvirlar vidjeti"
|
|
22
|
+
|
|
23
|
+
msgctxt "The label for the image style button that wraps text around the image."
|
|
24
|
+
msgid "Wrap text"
|
|
25
|
+
msgstr ""
|
|
26
|
+
|
|
27
|
+
msgctxt "The label for the image style button that breaks the text around the image."
|
|
28
|
+
msgid "Break text"
|
|
29
|
+
msgstr ""
|
|
30
|
+
|
|
31
|
+
msgctxt "The label for the image style button that places the image inside the line of text."
|
|
32
|
+
msgid "In line"
|
|
33
|
+
msgstr ""
|
|
34
|
+
|
|
35
|
+
msgctxt "The label for the Side image option."
|
|
36
|
+
msgid "Side image"
|
|
37
|
+
msgstr "Yon tasvir"
|
|
38
|
+
|
|
39
|
+
msgctxt "The label for the Full size image option."
|
|
40
|
+
msgid "Full size image"
|
|
41
|
+
msgstr "Asl rasm hajmi"
|
|
42
|
+
|
|
43
|
+
msgctxt "The label for the Left aligned image option."
|
|
44
|
+
msgid "Left aligned image"
|
|
45
|
+
msgstr "Chapga tekislash"
|
|
46
|
+
|
|
47
|
+
msgctxt "The label for the Centered image option."
|
|
48
|
+
msgid "Centered image"
|
|
49
|
+
msgstr "Markazga tekislash"
|
|
50
|
+
|
|
51
|
+
msgctxt "The label for the Right aligned image option."
|
|
52
|
+
msgid "Right aligned image"
|
|
53
|
+
msgstr "O'ngga tekislash"
|
|
54
|
+
|
|
55
|
+
msgctxt "The label for the Change image text alternative button."
|
|
56
|
+
msgid "Change image text alternative"
|
|
57
|
+
msgstr "Muqobil matnni tahrirlash"
|
|
58
|
+
|
|
59
|
+
msgctxt "The label for the image text alternative input."
|
|
60
|
+
msgid "Text alternative"
|
|
61
|
+
msgstr "Muqobil matn"
|
|
62
|
+
|
|
63
|
+
msgctxt "The placeholder text for the image caption displayed when the caption is empty."
|
|
64
|
+
msgid "Enter image caption"
|
|
65
|
+
msgstr "Rasm sarlavhasi"
|
|
66
|
+
|
|
67
|
+
msgctxt "The label for the insert image toolbar button."
|
|
68
|
+
msgid "Insert image"
|
|
69
|
+
msgstr "Rasm kiritish"
|
|
70
|
+
|
|
71
|
+
msgctxt "The title of the notification displayed when upload fails."
|
|
72
|
+
msgid "Upload failed"
|
|
73
|
+
msgstr "Yuklab olinmadi"
|
|
74
|
+
|
|
75
|
+
msgctxt "The label used by assistive technologies describing an image toolbar attached to an image widget."
|
|
76
|
+
msgid "Image toolbar"
|
|
77
|
+
msgstr "Rasm asboblari paneli"
|
|
78
|
+
|
|
79
|
+
msgctxt "The label used for the dropdown in the image toolbar containing defined resize options."
|
|
80
|
+
msgid "Resize image"
|
|
81
|
+
msgstr "Rasm hajmini o'zgartirish"
|
|
82
|
+
|
|
83
|
+
msgctxt "The label used for the standalone resize options buttons in the image toolbar."
|
|
84
|
+
msgid "Resize image to %0"
|
|
85
|
+
msgstr "Rasm hajmini %0 ga o‘zgartirish"
|
|
86
|
+
|
|
87
|
+
msgctxt "The accessibility label of the standalone image resize reset option button in the image toolbar for screen readers."
|
|
88
|
+
msgid "Resize image to the original size"
|
|
89
|
+
msgstr "Rasmning o'lchamini asl o'lchamiga o'zgartiring"
|
|
90
|
+
|
|
91
|
+
msgctxt "The default label for the resize option that resets the size of the image."
|
|
92
|
+
msgid "Original"
|
|
93
|
+
msgstr "Asl"
|
|
94
|
+
|
|
95
|
+
msgctxt "The accessibility label of the image resize dropdown for screen readers."
|
|
96
|
+
msgid "Image resize list"
|
|
97
|
+
msgstr "Hajmlar ro'yxati"
|
|
98
|
+
|
|
99
|
+
msgctxt "The label of the form submit button if the image source URL input has no value."
|
|
100
|
+
msgid "Insert"
|
|
101
|
+
msgstr "Kiritish"
|
|
102
|
+
|
|
103
|
+
msgctxt "The label of the form submit button if the image source URL input has a value."
|
|
104
|
+
msgid "Update"
|
|
105
|
+
msgstr "O'zgartirish"
|
|
106
|
+
|
|
107
|
+
msgctxt "The input label for the Insert image via URL form."
|
|
108
|
+
msgid "Insert image via URL"
|
|
109
|
+
msgstr "Rasmni URL orqali kiritish"
|
|
110
|
+
|
|
111
|
+
msgctxt "The input label for the Insert image via URL form for a pre-existing image."
|
|
112
|
+
msgid "Update image URL"
|
|
113
|
+
msgstr "Rasm URL manzilini o'zgartirish"
|
package/lang/translations/vi.po
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2003-
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
2
|
#
|
|
3
3
|
# !!! IMPORTANT !!!
|
|
4
4
|
#
|
|
@@ -82,7 +82,7 @@ msgstr "调整图像大小"
|
|
|
82
82
|
|
|
83
83
|
msgctxt "The label used for the standalone resize options buttons in the image toolbar."
|
|
84
84
|
msgid "Resize image to %0"
|
|
85
|
-
msgstr "
|
|
85
|
+
msgstr "调整图像大小为%0"
|
|
86
86
|
|
|
87
87
|
msgctxt "The accessibility label of the standalone image resize reset option button in the image toolbar for screen readers."
|
|
88
88
|
msgid "Resize image to the original size"
|
package/lang/translations/zh.po
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2003-
|
|
1
|
+
# Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
2
2
|
#
|
|
3
3
|
# !!! IMPORTANT !!!
|
|
4
4
|
#
|
|
@@ -98,16 +98,16 @@ msgstr "圖片縮放清單"
|
|
|
98
98
|
|
|
99
99
|
msgctxt "The label of the form submit button if the image source URL input has no value."
|
|
100
100
|
msgid "Insert"
|
|
101
|
-
msgstr ""
|
|
101
|
+
msgstr "插入"
|
|
102
102
|
|
|
103
103
|
msgctxt "The label of the form submit button if the image source URL input has a value."
|
|
104
104
|
msgid "Update"
|
|
105
|
-
msgstr ""
|
|
105
|
+
msgstr "更新"
|
|
106
106
|
|
|
107
107
|
msgctxt "The input label for the Insert image via URL form."
|
|
108
108
|
msgid "Insert image via URL"
|
|
109
|
-
msgstr ""
|
|
109
|
+
msgstr "使用連結插入圖片"
|
|
110
110
|
|
|
111
111
|
msgctxt "The input label for the Insert image via URL form for a pre-existing image."
|
|
112
112
|
msgid "Update image URL"
|
|
113
|
-
msgstr ""
|
|
113
|
+
msgstr "更新圖片連結"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-image",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "32.0.0",
|
|
4
4
|
"description": "Image feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,44 +12,44 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-ui": "^
|
|
16
|
-
"ckeditor5": "^
|
|
15
|
+
"@ckeditor/ckeditor5-ui": "^32.0.0",
|
|
16
|
+
"ckeditor5": "^32.0.0",
|
|
17
17
|
"lodash-es": "^4.17.15"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@ckeditor/ckeditor5-adapter-ckfinder": "^
|
|
21
|
-
"@ckeditor/ckeditor5-autoformat": "^
|
|
22
|
-
"@ckeditor/ckeditor5-basic-styles": "^
|
|
23
|
-
"@ckeditor/ckeditor5-block-quote": "^
|
|
24
|
-
"@ckeditor/ckeditor5-ckfinder": "^
|
|
25
|
-
"@ckeditor/ckeditor5-clipboard": "^
|
|
26
|
-
"@ckeditor/ckeditor5-cloud-services": "^
|
|
27
|
-
"@ckeditor/ckeditor5-core": "^
|
|
28
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
29
|
-
"@ckeditor/ckeditor5-easy-image": "^
|
|
30
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
31
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
32
|
-
"@ckeditor/ckeditor5-enter": "^
|
|
33
|
-
"@ckeditor/ckeditor5-essentials": "^
|
|
34
|
-
"@ckeditor/ckeditor5-heading": "^
|
|
35
|
-
"@ckeditor/ckeditor5-html-embed": "^
|
|
36
|
-
"@ckeditor/ckeditor5-indent": "^
|
|
37
|
-
"@ckeditor/ckeditor5-link": "^
|
|
38
|
-
"@ckeditor/ckeditor5-list": "^
|
|
39
|
-
"@ckeditor/ckeditor5-media-embed": "^
|
|
40
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
41
|
-
"@ckeditor/ckeditor5-table": "^
|
|
42
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
|
43
|
-
"@ckeditor/ckeditor5-typing": "^
|
|
44
|
-
"@ckeditor/ckeditor5-undo": "^
|
|
45
|
-
"@ckeditor/ckeditor5-upload": "^
|
|
46
|
-
"@ckeditor/ckeditor5-utils": "^
|
|
47
|
-
"@ckeditor/ckeditor5-widget": "^
|
|
48
|
-
"webpack": "^
|
|
49
|
-
"webpack-cli": "^
|
|
20
|
+
"@ckeditor/ckeditor5-adapter-ckfinder": "^32.0.0",
|
|
21
|
+
"@ckeditor/ckeditor5-autoformat": "^32.0.0",
|
|
22
|
+
"@ckeditor/ckeditor5-basic-styles": "^32.0.0",
|
|
23
|
+
"@ckeditor/ckeditor5-block-quote": "^32.0.0",
|
|
24
|
+
"@ckeditor/ckeditor5-ckfinder": "^32.0.0",
|
|
25
|
+
"@ckeditor/ckeditor5-clipboard": "^32.0.0",
|
|
26
|
+
"@ckeditor/ckeditor5-cloud-services": "^32.0.0",
|
|
27
|
+
"@ckeditor/ckeditor5-core": "^32.0.0",
|
|
28
|
+
"@ckeditor/ckeditor5-dev-utils": "^27.1.0",
|
|
29
|
+
"@ckeditor/ckeditor5-easy-image": "^32.0.0",
|
|
30
|
+
"@ckeditor/ckeditor5-editor-classic": "^32.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-engine": "^32.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-enter": "^32.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-essentials": "^32.0.0",
|
|
34
|
+
"@ckeditor/ckeditor5-heading": "^32.0.0",
|
|
35
|
+
"@ckeditor/ckeditor5-html-embed": "^32.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-indent": "^32.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-link": "^32.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-list": "^32.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-media-embed": "^32.0.0",
|
|
40
|
+
"@ckeditor/ckeditor5-paragraph": "^32.0.0",
|
|
41
|
+
"@ckeditor/ckeditor5-table": "^32.0.0",
|
|
42
|
+
"@ckeditor/ckeditor5-theme-lark": "^32.0.0",
|
|
43
|
+
"@ckeditor/ckeditor5-typing": "^32.0.0",
|
|
44
|
+
"@ckeditor/ckeditor5-undo": "^32.0.0",
|
|
45
|
+
"@ckeditor/ckeditor5-upload": "^32.0.0",
|
|
46
|
+
"@ckeditor/ckeditor5-utils": "^32.0.0",
|
|
47
|
+
"@ckeditor/ckeditor5-widget": "^32.0.0",
|
|
48
|
+
"webpack": "^5.58.1",
|
|
49
|
+
"webpack-cli": "^4.9.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
52
|
+
"node": ">=14.0.0",
|
|
53
53
|
"npm": ">=5.7.1"
|
|
54
54
|
},
|
|
55
55
|
"author": "CKSource (http://cksource.com/)",
|
package/src/autoimage.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -11,6 +11,7 @@ import { Plugin } from 'ckeditor5/src/core';
|
|
|
11
11
|
import { Clipboard } from 'ckeditor5/src/clipboard';
|
|
12
12
|
import { LivePosition, LiveRange } from 'ckeditor5/src/engine';
|
|
13
13
|
import { Undo } from 'ckeditor5/src/undo';
|
|
14
|
+
import { Delete } from 'ckeditor5/src/typing';
|
|
14
15
|
import { global } from 'ckeditor5/src/utils';
|
|
15
16
|
|
|
16
17
|
import ImageUtils from './imageutils';
|
|
@@ -32,7 +33,7 @@ export default class AutoImage extends Plugin {
|
|
|
32
33
|
* @inheritDoc
|
|
33
34
|
*/
|
|
34
35
|
static get requires() {
|
|
35
|
-
return [ Clipboard, ImageUtils, Undo ];
|
|
36
|
+
return [ Clipboard, ImageUtils, Undo, Delete ];
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
/**
|
|
@@ -173,6 +174,8 @@ export default class AutoImage extends Plugin {
|
|
|
173
174
|
this._positionToInsert.detach();
|
|
174
175
|
this._positionToInsert = null;
|
|
175
176
|
} );
|
|
177
|
+
|
|
178
|
+
editor.plugins.get( 'Delete' ).requestUndoOnBackspace();
|
|
176
179
|
}, 100 );
|
|
177
180
|
}
|
|
178
181
|
}
|
package/src/image/converters.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -39,11 +39,14 @@ export function upcastImageFigure( imageUtils ) {
|
|
|
39
39
|
// Find an image element inside the figure element.
|
|
40
40
|
const viewImage = imageUtils.findViewImgElement( data.viewItem );
|
|
41
41
|
|
|
42
|
-
// Do not convert if image element is absent
|
|
43
|
-
if ( !viewImage || !
|
|
42
|
+
// Do not convert if image element is absent or was already converted.
|
|
43
|
+
if ( !viewImage || !conversionApi.consumable.test( viewImage, { name: true } ) ) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
// Consume the figure to prevent other converters from processing it again.
|
|
48
|
+
conversionApi.consumable.consume( data.viewItem, { name: true, classes: 'image' } );
|
|
49
|
+
|
|
47
50
|
// Convert view image to model image.
|
|
48
51
|
const conversionResult = conversionApi.convertItem( viewImage, data.modelCursor );
|
|
49
52
|
|
|
@@ -52,6 +55,9 @@ export function upcastImageFigure( imageUtils ) {
|
|
|
52
55
|
|
|
53
56
|
// When image wasn't successfully converted then finish conversion.
|
|
54
57
|
if ( !modelImage ) {
|
|
58
|
+
// Revert consumed figure so other features can convert it.
|
|
59
|
+
conversionApi.consumable.revert( data.viewItem, { name: true, classes: 'image' } );
|
|
60
|
+
|
|
55
61
|
return;
|
|
56
62
|
}
|
|
57
63
|
|
|
@@ -136,12 +142,6 @@ export function upcastPicture( imageUtils ) {
|
|
|
136
142
|
data.modelCursor = conversionResult.modelCursor;
|
|
137
143
|
|
|
138
144
|
modelImage = first( conversionResult.modelRange.getItems() );
|
|
139
|
-
|
|
140
|
-
// It could be that the <img/> was broken (e.g. missing "src"). There's no point in converting
|
|
141
|
-
// <picture> any further around a broken <img/>.
|
|
142
|
-
if ( !modelImage ) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
conversionApi.consumable.consume( pictureViewElement, { name: true } );
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -112,7 +112,10 @@ export default class ImageBlockEditing extends Plugin {
|
|
|
112
112
|
conversion.for( 'upcast' )
|
|
113
113
|
.elementToElement( {
|
|
114
114
|
view: getImgViewElementMatcher( editor, 'imageBlock' ),
|
|
115
|
-
model: ( viewImage, { writer } ) => writer.createElement(
|
|
115
|
+
model: ( viewImage, { writer } ) => writer.createElement(
|
|
116
|
+
'imageBlock',
|
|
117
|
+
viewImage.hasAttribute( 'src' ) ? { src: viewImage.getAttribute( 'src' ) } : null
|
|
118
|
+
)
|
|
116
119
|
} )
|
|
117
120
|
.add( upcastImageFigure( imageUtils ) );
|
|
118
121
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -64,6 +64,7 @@ export default class ImageInlineEditing extends Plugin {
|
|
|
64
64
|
isObject: true,
|
|
65
65
|
isInline: true,
|
|
66
66
|
allowWhere: '$text',
|
|
67
|
+
allowAttributesOf: '$text',
|
|
67
68
|
allowAttributes: [ 'alt', 'src', 'srcset' ]
|
|
68
69
|
} );
|
|
69
70
|
|
|
@@ -120,7 +121,10 @@ export default class ImageInlineEditing extends Plugin {
|
|
|
120
121
|
conversion.for( 'upcast' )
|
|
121
122
|
.elementToElement( {
|
|
122
123
|
view: getImgViewElementMatcher( editor, 'imageInline' ),
|
|
123
|
-
model: ( viewImage, { writer } ) => writer.createElement(
|
|
124
|
+
model: ( viewImage, { writer } ) => writer.createElement(
|
|
125
|
+
'imageInline',
|
|
126
|
+
viewImage.hasAttribute( 'src' ) ? { src: viewImage.getAttribute( 'src' ) } : null
|
|
127
|
+
)
|
|
124
128
|
} );
|
|
125
129
|
}
|
|
126
130
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
package/src/image/ui/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -47,7 +47,8 @@ export function getBalloonPositionData( editor ) {
|
|
|
47
47
|
defaultPositions.northArrowSouthEast,
|
|
48
48
|
defaultPositions.southArrowNorth,
|
|
49
49
|
defaultPositions.southArrowNorthWest,
|
|
50
|
-
defaultPositions.southArrowNorthEast
|
|
50
|
+
defaultPositions.southArrowNorthEast,
|
|
51
|
+
defaultPositions.viewportStickyNorth
|
|
51
52
|
]
|
|
52
53
|
};
|
|
53
54
|
}
|
package/src/image/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -49,19 +49,14 @@ export function createImageViewElement( writer, imageType ) {
|
|
|
49
49
|
*/
|
|
50
50
|
export function getImgViewElementMatcher( editor, matchImageType ) {
|
|
51
51
|
if ( editor.plugins.has( 'ImageInlineEditing' ) !== editor.plugins.has( 'ImageBlockEditing' ) ) {
|
|
52
|
-
return {
|
|
53
|
-
name: 'img',
|
|
54
|
-
attributes: {
|
|
55
|
-
src: true
|
|
56
|
-
}
|
|
57
|
-
};
|
|
52
|
+
return { name: 'img' };
|
|
58
53
|
}
|
|
59
54
|
|
|
60
55
|
const imageUtils = editor.plugins.get( 'ImageUtils' );
|
|
61
56
|
|
|
62
57
|
return element => {
|
|
63
|
-
//
|
|
64
|
-
if ( !imageUtils.isInlineImageView( element )
|
|
58
|
+
// Check if view element is an `img`.
|
|
59
|
+
if ( !imageUtils.isInlineImageView( element ) ) {
|
|
65
60
|
return null;
|
|
66
61
|
}
|
|
67
62
|
|
|
@@ -73,7 +68,7 @@ export function getImgViewElementMatcher( editor, matchImageType ) {
|
|
|
73
68
|
return null;
|
|
74
69
|
}
|
|
75
70
|
|
|
76
|
-
return { name: true
|
|
71
|
+
return { name: true };
|
|
77
72
|
};
|
|
78
73
|
}
|
|
79
74
|
|
package/src/image.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
package/src/imageblock.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { Plugin } from 'ckeditor5/src/core';
|
|
11
11
|
import { Element, enablePlaceholder } from 'ckeditor5/src/engine';
|
|
12
|
-
import {
|
|
13
|
-
import { toArray } from 'ckeditor5/src/utils';
|
|
12
|
+
import { toWidgetEditable } from 'ckeditor5/src/widget';
|
|
14
13
|
|
|
15
14
|
import ToggleImageCaptionCommand from './toggleimagecaptioncommand';
|
|
16
15
|
|
|
@@ -132,16 +131,7 @@ export default class ImageCaptionEditing extends Plugin {
|
|
|
132
131
|
keepOnFocus: true
|
|
133
132
|
} );
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
setHighlightHandling(
|
|
138
|
-
widgetEditable,
|
|
139
|
-
writer,
|
|
140
|
-
( element, descriptor, writer ) => writer.addClass( toArray( descriptor.classes ), element ),
|
|
141
|
-
( element, descriptor, writer ) => writer.removeClass( toArray( descriptor.classes ), element )
|
|
142
|
-
);
|
|
143
|
-
|
|
144
|
-
return widgetEditable;
|
|
134
|
+
return toWidgetEditable( figcaptionElement, writer );
|
|
145
135
|
}
|
|
146
136
|
} );
|
|
147
137
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
package/src/imagecaption.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
package/src/imageinline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -203,6 +203,16 @@ export default class ImageInsertPanelView extends View {
|
|
|
203
203
|
}, { priority: 'high' } );
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
/**
|
|
207
|
+
* @inheritDoc
|
|
208
|
+
*/
|
|
209
|
+
destroy() {
|
|
210
|
+
super.destroy();
|
|
211
|
+
|
|
212
|
+
this.focusTracker.destroy();
|
|
213
|
+
this.keystrokes.destroy();
|
|
214
|
+
}
|
|
215
|
+
|
|
206
216
|
/**
|
|
207
217
|
* Returns a view of the integration.
|
|
208
218
|
*
|
package/src/imageinsert/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
package/src/imageinsert.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2022, 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
|
|