@ckeditor/ckeditor5-image 33.0.0 → 34.2.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.
@@ -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: Javanese (https://www.transifex.com/ckeditor/teams/11143/jv/)\n"
16
+ "Language: jv\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+
19
+ msgctxt "The label for the image widget."
20
+ msgid "image widget"
21
+ msgstr ""
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 ""
38
+
39
+ msgctxt "The label for the Full size image option."
40
+ msgid "Full size image"
41
+ msgstr "Gambar ukuran kebak"
42
+
43
+ msgctxt "The label for the Left aligned image option."
44
+ msgid "Left aligned image"
45
+ msgstr "Gambar ing kiwa"
46
+
47
+ msgctxt "The label for the Centered image option."
48
+ msgid "Centered image"
49
+ msgstr "Gambar ing tengah"
50
+
51
+ msgctxt "The label for the Right aligned image option."
52
+ msgid "Right aligned image"
53
+ msgstr "Gambar ing tengen"
54
+
55
+ msgctxt "The label for the Change image text alternative button."
56
+ msgid "Change image text alternative"
57
+ msgstr ""
58
+
59
+ msgctxt "The label for the image text alternative input."
60
+ msgid "Text alternative"
61
+ msgstr ""
62
+
63
+ msgctxt "The placeholder text for the image caption displayed when the caption is empty."
64
+ msgid "Enter image caption"
65
+ msgstr ""
66
+
67
+ msgctxt "The label for the insert image toolbar button."
68
+ msgid "Insert image"
69
+ msgstr "Tambahaken gambar"
70
+
71
+ msgctxt "The title of the notification displayed when upload fails."
72
+ msgid "Upload failed"
73
+ msgstr ""
74
+
75
+ msgctxt "The label used by assistive technologies describing an image toolbar attached to an image widget."
76
+ msgid "Image toolbar"
77
+ msgstr ""
78
+
79
+ msgctxt "The label used for the dropdown in the image toolbar containing defined resize options."
80
+ msgid "Resize image"
81
+ msgstr ""
82
+
83
+ msgctxt "The label used for the standalone resize options buttons in the image toolbar."
84
+ msgid "Resize image to %0"
85
+ msgstr ""
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 ""
90
+
91
+ msgctxt "The default label for the resize option that resets the size of the image."
92
+ msgid "Original"
93
+ msgstr "Asli"
94
+
95
+ msgctxt "The accessibility label of the image resize dropdown for screen readers."
96
+ msgid "Image resize list"
97
+ msgstr ""
98
+
99
+ msgctxt "The label of the form submit button if the image source URL input has no value."
100
+ msgid "Insert"
101
+ msgstr "Tambah"
102
+
103
+ msgctxt "The label of the form submit button if the image source URL input has a value."
104
+ msgid "Update"
105
+ msgstr ""
106
+
107
+ msgctxt "The input label for the Insert image via URL form."
108
+ msgid "Insert image via URL"
109
+ msgstr "Tambah gambar saking URL"
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 ""
@@ -22,15 +22,15 @@ msgstr "attēla sīkrīks"
22
22
 
23
23
  msgctxt "The label for the image style button that wraps text around the image."
24
24
  msgid "Wrap text"
25
- msgstr ""
25
+ msgstr "Aplauzt tekstu"
26
26
 
27
27
  msgctxt "The label for the image style button that breaks the text around the image."
28
28
  msgid "Break text"
29
- msgstr ""
29
+ msgstr "Pārtraukt tekstu"
30
30
 
31
31
  msgctxt "The label for the image style button that places the image inside the line of text."
32
32
  msgid "In line"
33
- msgstr ""
33
+ msgstr "Rindā"
34
34
 
35
35
  msgctxt "The label for the Side image option."
36
36
  msgid "Side image"
@@ -78,36 +78,36 @@ msgstr "Attēlu rīkjosla"
78
78
 
79
79
  msgctxt "The label used for the dropdown in the image toolbar containing defined resize options."
80
80
  msgid "Resize image"
81
- msgstr ""
81
+ msgstr "Mainīt attēla izmērus"
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 "Mainīt attēla izmēru uz %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"
89
- msgstr ""
89
+ msgstr "Mainīt attēla izmēru uz oriģinālo izmēru"
90
90
 
91
91
  msgctxt "The default label for the resize option that resets the size of the image."
92
92
  msgid "Original"
93
- msgstr ""
93
+ msgstr "Oriģināls"
94
94
 
95
95
  msgctxt "The accessibility label of the image resize dropdown for screen readers."
96
96
  msgid "Image resize list"
97
- msgstr ""
97
+ msgstr "Attēla izmēru saraksts"
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 "Ievietot"
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 "Atjaunināt"
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 "Ievietot attēlu, izmantojot saiti"
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 "Labot attēla avota saiti"
@@ -14,7 +14,7 @@ msgid ""
14
14
  msgstr ""
15
15
  "Language-Team: Portuguese (Brazil) (https://www.transifex.com/ckeditor/teams/11143/pt_BR/)\n"
16
16
  "Language: pt_BR\n"
17
- "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
+ "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
18
18
 
19
19
  msgctxt "The label for the image widget."
20
20
  msgid "image widget"
@@ -14,7 +14,7 @@ msgid ""
14
14
  msgstr ""
15
15
  "Language-Team: Portuguese (https://www.transifex.com/ckeditor/teams/11143/pt/)\n"
16
16
  "Language: pt\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
18
18
 
19
19
  msgctxt "The label for the image widget."
20
20
  msgid "image widget"
@@ -22,15 +22,15 @@ msgstr "widget obrázka"
22
22
 
23
23
  msgctxt "The label for the image style button that wraps text around the image."
24
24
  msgid "Wrap text"
25
- msgstr ""
25
+ msgstr "Obtekanie textu"
26
26
 
27
27
  msgctxt "The label for the image style button that breaks the text around the image."
28
28
  msgid "Break text"
29
- msgstr ""
29
+ msgstr "Zalomenie textu"
30
30
 
31
31
  msgctxt "The label for the image style button that places the image inside the line of text."
32
32
  msgid "In line"
33
- msgstr ""
33
+ msgstr "V riadku"
34
34
 
35
35
  msgctxt "The label for the Side image option."
36
36
  msgid "Side image"
@@ -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: Urdu (https://www.transifex.com/ckeditor/teams/11143/ur/)\n"
16
+ "Language: ur\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+
19
+ msgctxt "The label for the image widget."
20
+ msgid "image widget"
21
+ msgstr "آلۂ عکس"
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 "عکس بہ پہلو"
38
+
39
+ msgctxt "The label for the Full size image option."
40
+ msgid "Full size image"
41
+ msgstr "مکمل پہمائش کا عکس"
42
+
43
+ msgctxt "The label for the Left aligned image option."
44
+ msgid "Left aligned image"
45
+ msgstr ""
46
+
47
+ msgctxt "The label for the Centered image option."
48
+ msgid "Centered image"
49
+ msgstr ""
50
+
51
+ msgctxt "The label for the Right aligned image option."
52
+ msgid "Right aligned image"
53
+ msgstr ""
54
+
55
+ msgctxt "The label for the Change image text alternative button."
56
+ msgid "Change image text alternative"
57
+ msgstr ""
58
+
59
+ msgctxt "The label for the image text alternative input."
60
+ msgid "Text alternative"
61
+ msgstr ""
62
+
63
+ msgctxt "The placeholder text for the image caption displayed when the caption is empty."
64
+ msgid "Enter image caption"
65
+ msgstr ""
66
+
67
+ msgctxt "The label for the insert image toolbar button."
68
+ msgid "Insert image"
69
+ msgstr ""
70
+
71
+ msgctxt "The title of the notification displayed when upload fails."
72
+ msgid "Upload failed"
73
+ msgstr ""
74
+
75
+ msgctxt "The label used by assistive technologies describing an image toolbar attached to an image widget."
76
+ msgid "Image toolbar"
77
+ msgstr "آلہ جات برائے عکس"
78
+
79
+ msgctxt "The label used for the dropdown in the image toolbar containing defined resize options."
80
+ msgid "Resize image"
81
+ msgstr ""
82
+
83
+ msgctxt "The label used for the standalone resize options buttons in the image toolbar."
84
+ msgid "Resize image to %0"
85
+ msgstr ""
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 ""
90
+
91
+ msgctxt "The default label for the resize option that resets the size of the image."
92
+ msgid "Original"
93
+ msgstr ""
94
+
95
+ msgctxt "The accessibility label of the image resize dropdown for screen readers."
96
+ msgid "Image resize list"
97
+ msgstr ""
98
+
99
+ msgctxt "The label of the form submit button if the image source URL input has no value."
100
+ msgid "Insert"
101
+ msgstr ""
102
+
103
+ msgctxt "The label of the form submit button if the image source URL input has a value."
104
+ msgid "Update"
105
+ msgstr ""
106
+
107
+ msgctxt "The input label for the Insert image via URL form."
108
+ msgid "Insert image via URL"
109
+ msgstr ""
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 ""
@@ -18,19 +18,19 @@ msgstr ""
18
18
 
19
19
  msgctxt "The label for the image widget."
20
20
  msgid "image widget"
21
- msgstr "图像小部件"
21
+ msgstr "图片组件"
22
22
 
23
23
  msgctxt "The label for the image style button that wraps text around the image."
24
24
  msgid "Wrap text"
25
- msgstr ""
25
+ msgstr "文字环绕"
26
26
 
27
27
  msgctxt "The label for the image style button that breaks the text around the image."
28
28
  msgid "Break text"
29
- msgstr ""
29
+ msgstr "文字断行"
30
30
 
31
31
  msgctxt "The label for the image style button that places the image inside the line of text."
32
32
  msgid "In line"
33
- msgstr ""
33
+ msgstr "行内"
34
34
 
35
35
  msgctxt "The label for the Side image option."
36
36
  msgid "Side image"
@@ -38,7 +38,7 @@ msgstr "图片侧边显示"
38
38
 
39
39
  msgctxt "The label for the Full size image option."
40
40
  msgid "Full size image"
41
- msgstr "图片通栏显示"
41
+ msgstr "全尺寸图片"
42
42
 
43
43
  msgctxt "The label for the Left aligned image option."
44
44
  msgid "Left aligned image"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-image",
3
- "version": "33.0.0",
3
+ "version": "34.2.0",
4
4
  "description": "Image feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -12,40 +12,40 @@
12
12
  ],
13
13
  "main": "src/index.js",
14
14
  "dependencies": {
15
- "@ckeditor/ckeditor5-ui": "^33.0.0",
16
- "ckeditor5": "^33.0.0",
15
+ "@ckeditor/ckeditor5-ui": "^34.2.0",
16
+ "ckeditor5": "^34.2.0",
17
17
  "lodash-es": "^4.17.15"
18
18
  },
19
19
  "devDependencies": {
20
- "@ckeditor/ckeditor5-adapter-ckfinder": "^33.0.0",
21
- "@ckeditor/ckeditor5-autoformat": "^33.0.0",
22
- "@ckeditor/ckeditor5-basic-styles": "^33.0.0",
23
- "@ckeditor/ckeditor5-block-quote": "^33.0.0",
24
- "@ckeditor/ckeditor5-ckfinder": "^33.0.0",
25
- "@ckeditor/ckeditor5-clipboard": "^33.0.0",
26
- "@ckeditor/ckeditor5-cloud-services": "^33.0.0",
27
- "@ckeditor/ckeditor5-core": "^33.0.0",
28
- "@ckeditor/ckeditor5-dev-utils": "^28.0.1",
29
- "@ckeditor/ckeditor5-easy-image": "^33.0.0",
30
- "@ckeditor/ckeditor5-editor-classic": "^33.0.0",
31
- "@ckeditor/ckeditor5-engine": "^33.0.0",
32
- "@ckeditor/ckeditor5-enter": "^33.0.0",
33
- "@ckeditor/ckeditor5-essentials": "^33.0.0",
34
- "@ckeditor/ckeditor5-heading": "^33.0.0",
35
- "@ckeditor/ckeditor5-html-embed": "^33.0.0",
36
- "@ckeditor/ckeditor5-indent": "^33.0.0",
37
- "@ckeditor/ckeditor5-link": "^33.0.0",
38
- "@ckeditor/ckeditor5-list": "^33.0.0",
39
- "@ckeditor/ckeditor5-media-embed": "^33.0.0",
40
- "@ckeditor/ckeditor5-paragraph": "^33.0.0",
41
- "@ckeditor/ckeditor5-table": "^33.0.0",
42
- "@ckeditor/ckeditor5-theme-lark": "^33.0.0",
43
- "@ckeditor/ckeditor5-typing": "^33.0.0",
44
- "@ckeditor/ckeditor5-undo": "^33.0.0",
45
- "@ckeditor/ckeditor5-upload": "^33.0.0",
46
- "@ckeditor/ckeditor5-utils": "^33.0.0",
47
- "@ckeditor/ckeditor5-watchdog": "^33.0.0",
48
- "@ckeditor/ckeditor5-widget": "^33.0.0",
20
+ "@ckeditor/ckeditor5-adapter-ckfinder": "^34.2.0",
21
+ "@ckeditor/ckeditor5-autoformat": "^34.2.0",
22
+ "@ckeditor/ckeditor5-basic-styles": "^34.2.0",
23
+ "@ckeditor/ckeditor5-block-quote": "^34.2.0",
24
+ "@ckeditor/ckeditor5-ckfinder": "^34.2.0",
25
+ "@ckeditor/ckeditor5-clipboard": "^34.2.0",
26
+ "@ckeditor/ckeditor5-cloud-services": "^34.2.0",
27
+ "@ckeditor/ckeditor5-core": "^34.2.0",
28
+ "@ckeditor/ckeditor5-dev-utils": "^30.0.0",
29
+ "@ckeditor/ckeditor5-easy-image": "^34.2.0",
30
+ "@ckeditor/ckeditor5-editor-classic": "^34.2.0",
31
+ "@ckeditor/ckeditor5-engine": "^34.2.0",
32
+ "@ckeditor/ckeditor5-enter": "^34.2.0",
33
+ "@ckeditor/ckeditor5-essentials": "^34.2.0",
34
+ "@ckeditor/ckeditor5-heading": "^34.2.0",
35
+ "@ckeditor/ckeditor5-html-embed": "^34.2.0",
36
+ "@ckeditor/ckeditor5-indent": "^34.2.0",
37
+ "@ckeditor/ckeditor5-link": "^34.2.0",
38
+ "@ckeditor/ckeditor5-list": "^34.2.0",
39
+ "@ckeditor/ckeditor5-media-embed": "^34.2.0",
40
+ "@ckeditor/ckeditor5-paragraph": "^34.2.0",
41
+ "@ckeditor/ckeditor5-table": "^34.2.0",
42
+ "@ckeditor/ckeditor5-theme-lark": "^34.2.0",
43
+ "@ckeditor/ckeditor5-typing": "^34.2.0",
44
+ "@ckeditor/ckeditor5-undo": "^34.2.0",
45
+ "@ckeditor/ckeditor5-upload": "^34.2.0",
46
+ "@ckeditor/ckeditor5-utils": "^34.2.0",
47
+ "@ckeditor/ckeditor5-watchdog": "^34.2.0",
48
+ "@ckeditor/ckeditor5-widget": "^34.2.0",
49
49
  "webpack": "^5.58.1",
50
50
  "webpack-cli": "^4.9.0"
51
51
  },
@@ -82,7 +82,7 @@ export function upcastImageFigure( imageUtils ) {
82
82
  * @returns {Function}
83
83
  */
84
84
  export function upcastPicture( imageUtils ) {
85
- const sourceAttributeNames = [ 'srcset', 'media', 'type' ];
85
+ const sourceAttributeNames = [ 'srcset', 'media', 'type', 'sizes' ];
86
86
 
87
87
  return dispatcher => {
88
88
  dispatcher.on( 'element:picture', converter );
@@ -238,8 +238,7 @@ export function downcastSourcesAttribute( imageUtils ) {
238
238
  const pictureElement = viewWriter.createContainerElement( 'picture', null,
239
239
  data.attributeNewValue.map( sourceAttributes => {
240
240
  return viewWriter.createEmptyElement( 'source', sourceAttributes );
241
- } ),
242
- { isAllowedInsideAttributeElement: true }
241
+ } )
243
242
  );
244
243
 
245
244
  // Collect all wrapping attribute elements.
@@ -62,9 +62,7 @@ export default class ImageBlockEditing extends Plugin {
62
62
 
63
63
  // Converters 'alt' and 'srcset' are added in 'ImageEditing' plugin.
64
64
  schema.register( 'imageBlock', {
65
- isObject: true,
66
- isBlock: true,
67
- allowWhere: '$block',
65
+ inheritAllFrom: '$blockObject',
68
66
  allowAttributes: [ 'alt', 'src', 'srcset' ]
69
67
  } );
70
68
 
@@ -61,10 +61,7 @@ export default class ImageInlineEditing extends Plugin {
61
61
 
62
62
  // Converters 'alt' and 'srcset' are added in 'ImageEditing' plugin.
63
63
  schema.register( 'imageInline', {
64
- isObject: true,
65
- isInline: true,
66
- allowWhere: '$text',
67
- allowAttributesOf: '$text',
64
+ inheritAllFrom: '$inlineObject',
68
65
  allowAttributes: [ 'alt', 'src', 'srcset' ]
69
66
  } );
70
67
 
@@ -22,8 +22,7 @@ import { first } from 'ckeditor5/src/utils';
22
22
  */
23
23
  export function createInlineImageViewElement( writer ) {
24
24
  return writer.createContainerElement( 'span', { class: 'image-inline' },
25
- writer.createEmptyElement( 'img' ),
26
- { isAllowedInsideAttributeElement: true }
25
+ writer.createEmptyElement( 'img' )
27
26
  );
28
27
  }
29
28
 
@@ -54,18 +53,20 @@ export function createBlockImageViewElement( writer ) {
54
53
  * @returns {module:engine/view/matcher~MatcherPattern}
55
54
  */
56
55
  export function getImgViewElementMatcher( editor, matchImageType ) {
57
- if ( editor.plugins.has( 'ImageInlineEditing' ) !== editor.plugins.has( 'ImageBlockEditing' ) ) {
58
- return { name: 'img' };
59
- }
60
-
61
56
  const imageUtils = editor.plugins.get( 'ImageUtils' );
57
+ const areBothImagePluginsLoaded = editor.plugins.has( 'ImageInlineEditing' ) && editor.plugins.has( 'ImageBlockEditing' );
62
58
 
63
59
  return element => {
64
- // Check if view element is an `img`.
60
+ // Check if the matched view element is an <img>.
65
61
  if ( !imageUtils.isInlineImageView( element ) ) {
66
62
  return null;
67
63
  }
68
64
 
65
+ // If just one of the plugins is loaded (block or inline), it will match all kinds of images.
66
+ if ( !areBothImagePluginsLoaded ) {
67
+ return getPositiveMatchPattern( element );
68
+ }
69
+
69
70
  // The <img> can be standalone, wrapped in <figure>...</figure> (ImageBlock plugin) or
70
71
  // wrapped in <figure><a>...</a></figure> (LinkImage plugin).
71
72
  const imageType = element.findAncestor( imageUtils.isBlockImageView ) ? 'imageBlock' : 'imageInline';
@@ -74,8 +75,21 @@ export function getImgViewElementMatcher( editor, matchImageType ) {
74
75
  return null;
75
76
  }
76
77
 
77
- return { name: true };
78
+ return getPositiveMatchPattern( element );
78
79
  };
80
+
81
+ function getPositiveMatchPattern( element ) {
82
+ const pattern = {
83
+ name: true
84
+ };
85
+
86
+ // This will trigger src consumption (See https://github.com/ckeditor/ckeditor5/issues/11530).
87
+ if ( element.hasAttribute( 'src' ) ) {
88
+ pattern.attributes = [ 'src' ];
89
+ }
90
+
91
+ return pattern;
92
+ }
79
93
  }
80
94
 
81
95
  /**
@@ -129,6 +129,7 @@ export default class ImageStyleUI extends Plugin {
129
129
 
130
130
  const dropdownView = createDropdown( locale, SplitButtonView );
131
131
  const splitButtonView = dropdownView.buttonView;
132
+ const splitButtonViewArrow = splitButtonView.arrowView;
132
133
 
133
134
  addToolbarToDropdown( dropdownView, buttonViews );
134
135
 
@@ -138,6 +139,11 @@ export default class ImageStyleUI extends Plugin {
138
139
  tooltip: true
139
140
  } );
140
141
 
142
+ splitButtonViewArrow.unbind( 'label' );
143
+ splitButtonViewArrow.set( {
144
+ label: title
145
+ } );
146
+
141
147
  splitButtonView.bind( 'icon' ).toMany( buttonViews, 'isOn', ( ...areOn ) => {
142
148
  const index = areOn.findIndex( identity );
143
149
 
package/src/imageutils.js CHANGED
@@ -103,18 +103,15 @@ export default class ImageUtils extends Plugin {
103
103
  return model.change( writer => {
104
104
  const imageElement = writer.createElement( imageType, attributes );
105
105
 
106
- // If we want to insert a block image (for whatever reason) then we don't want to split text blocks.
107
- // This applies only when we don't have the selectable specified (i.e., we insert multiple block images at once).
108
- if ( !selectable && imageType != 'imageInline' ) {
109
- selectable = findOptimalInsertionRange( selection, model );
110
- }
111
-
112
- model.insertContent( imageElement, selectable );
106
+ model.insertObject( imageElement, selectable, null, {
107
+ setSelection: 'on',
108
+ // If we want to insert a block image (for whatever reason) then we don't want to split text blocks.
109
+ // This applies only when we don't have the selectable specified (i.e., we insert multiple block images at once).
110
+ findOptimalPosition: !selectable && imageType != 'imageInline'
111
+ } );
113
112
 
114
113
  // Inserting an image might've failed due to schema regulations.
115
114
  if ( imageElement.parent ) {
116
- writer.setSelection( imageElement, 'on' );
117
-
118
115
  return imageElement;
119
116
  }
120
117
 
package/src/index.js CHANGED
@@ -30,3 +30,4 @@ export { default as ImageUpload } from './imageupload';
30
30
  export { default as ImageUploadEditing } from './imageupload/imageuploadediting';
31
31
  export { default as ImageUploadProgress } from './imageupload/imageuploadprogress';
32
32
  export { default as ImageUploadUI } from './imageupload/imageuploadui';
33
+ export { default as PictureEditing } from './pictureediting';