From 6acff1d0f2364c6bba5a67c43f62bc028eb72663 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Smyrek?=
Date: Fri, 30 Oct 2020 14:26:44 +0100
Subject: [PATCH 1/9] Renamed buttons and commands
---
CHANGELOG.md | 4 +-
docs/_snippets/examples/inline-editor.js | 8 +-
docs/_snippets/examples/multi-root-editor.js | 2 +-
.../guides/integration/advanced-setup.md | 4 +-
.../guides/integration/installing-plugins.md | 2 +-
.../framework/guides/custom-editor-creator.md | 2 +-
.../tests/manual/uploadadapter.js | 2 +-
.../src/ckeditor.js | 2 +-
.../ckeditor5-build-balloon/src/ckeditor.js | 2 +-
.../ckeditor5-build-classic/src/ckeditor.js | 2 +-
.../src/ckeditor.js | 2 +-
.../ckeditor5-build-inline/src/ckeditor.js | 2 +-
packages/ckeditor5-ckfinder/CHANGELOG.md | 2 +-
.../features/ckfinder-upload-only.js | 2 +-
.../docs/features/ckfinder.md | 8 +-
.../ckeditor5-ckfinder/src/ckfindercommand.js | 8 +-
.../tests/ckfindercommand.js | 4 +-
packages/ckeditor5-core/src/command.js | 2 +-
.../docs/features/easy-image.md | 2 +-
.../ckeditor5-easy-image/tests/easyimage.js | 2 +-
.../tests/manual/easyimage.js | 2 +-
.../docs/_snippets/features/title.js | 2 +-
.../ckeditor5-heading/tests/manual/title.js | 4 +-
.../_snippets/features/horizontal-line.js | 2 +-
.../tests/horizontallineediting.js | 2 +-
.../tests/manual/horizontalline.js | 2 +-
.../docs/_snippets/features/html-embed.js | 2 +-
packages/ckeditor5-image/CHANGELOG.md | 12 +--
.../features/image-insert-via-url.js | 2 +-
.../features/image-resize-buttons-dropdown.js | 8 +-
.../features/image-resize-buttons.js | 12 +--
.../_snippets/features/image-resize-px.js | 8 +-
.../features/image-style-presentational.js | 8 +-
.../ckeditor5-image/docs/features/image.md | 54 ++++++-------
.../ckeditor5-image/src/image/imageediting.js | 11 ++-
.../src/image/imageinsertcommand.js | 11 +--
packages/ckeditor5-image/src/imageinsert.js | 2 +-
.../src/imageinsert/imageinsertui.js | 22 +++---
packages/ckeditor5-image/src/imageresize.js | 42 +++++------
.../src/imageresize/imageresizebuttons.js | 21 +++---
.../src/imageresize/imageresizecommand.js | 8 +-
.../src/imageresize/imageresizeediting.js | 16 ++--
.../src/imageresize/imageresizehandles.js | 4 +-
.../src/imageupload/imageuploadcommand.js | 11 +--
.../src/imageupload/imageuploadediting.js | 14 ++--
.../src/imageupload/imageuploadui.js | 17 +++--
.../tests/image/imageediting.js | 10 ++-
.../tests/image/imageinsertcommand.js | 6 +-
.../tests/imageinsert/imageinsertui.js | 25 ++++---
.../tests/imageresize/imageresizebuttons.js | 75 ++++++++++---------
.../tests/imageresize/imageresizecommand.js | 4 +-
.../tests/imageresize/imageresizeediting.js | 18 +++--
.../tests/imageresize/imageresizehandles.js | 12 +--
.../tests/imageupload/imageuploadcommand.js | 6 +-
.../tests/imageupload/imageuploadediting.js | 34 +++++----
.../tests/imageupload/imageuploadprogress.js | 14 ++--
.../tests/imageupload/imageuploadui.js | 51 +++++++------
.../tests/manual/imageinsertviaurl.js | 2 +-
.../tests/manual/imageinsertviaurl.md | 6 +-
.../tests/manual/imageresize.js | 2 +-
.../tests/manual/imageresizebuttons.js | 20 ++---
.../tests/manual/imageresizepx.js | 2 +-
.../tests/manual/imageupload.js | 2 +-
.../docs/_snippets/features/lists-basic.js | 2 +-
.../docs/_snippets/features/lists-style.js | 2 +-
.../src/todolistcheckcommand.js | 8 +-
.../ckeditor5-list/src/todolistediting.js | 18 +++--
.../tests/todolistcheckcommand.js | 6 +-
.../ckeditor5-list/tests/todolistediting.js | 22 +++---
.../docs/_snippets/features/page-break.js | 2 +-
.../tests/manual/pagebreak.js | 2 +-
.../tests/pagebreakediting.js | 2 +-
.../_snippets/features/paste-from-office.js | 2 +-
.../special-characters-extended-category.js | 2 +-
.../special-characters-limited-categories.js | 2 +-
.../special-characters-new-category.js | 2 +-
.../_snippets/features/special-characters.js | 2 +-
.../tests/manual/specialcharacters.js | 2 +-
.../docs/_snippets/features/blocktoolbar.js | 2 +-
.../docs/features/blocktoolbar.md | 4 +-
packages/ckeditor5-upload/CHANGELOG.md | 8 +-
packages/ckeditor5-widget/src/widgetresize.js | 2 +-
tests/manual/all-features.js | 10 +--
tests/manual/mathtype.js | 2 +-
tests/manual/memory/memory.js | 2 +-
tests/manual/wproofreader.js | 2 +-
86 files changed, 413 insertions(+), 347 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c2d2bdcb3a9..c9ed27ef313 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,7 +26,7 @@ The CKEditor 5 Collaboration features changelog can be found here: https://ckedi
### MAJOR BREAKING CHANGES [ℹ️](https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/versioning-policy.html#major-and-minor-breaking-changes)
-* **[image](https://www.npmjs.com/package/@ckeditor/ckeditor5-image)**: In order to use the "insert image via URL" feature you now need to load the `ImageInsert` plugin and use the `imageInsert` button instead of the `imageUpload` button that implemented this functionality previously.
+* **[image](https://www.npmjs.com/package/@ckeditor/ckeditor5-image)**: In order to use the "insert image via URL" feature you now need to load the `ImageInsert` plugin and use the `insertImage` button instead of the `uploadImage` button that implemented this functionality previously.
### MINOR BREAKING CHANGES [ℹ️](https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/versioning-policy.html#major-and-minor-breaking-changes)
@@ -57,7 +57,7 @@ The CKEditor 5 Collaboration features changelog can be found here: https://ckedi
### Other changes
* **[cloud-services-core](https://www.npmjs.com/package/@ckeditor/ckeditor-cloud-services-core)**: Change the token refreshing mechanism to depend on the token expiration time. ([commit](https://github.com/ckeditor/ckeditor5/commit/501490a5729c413ee00311fe3c9a965fab2bb2ad))
-* **[image](https://www.npmjs.com/package/@ckeditor/ckeditor5-image)**: The `config.image.upload.panel.items` option does not need to be set anymore in order to show the "insert image via URL form". It is enough to load the new `ImageInsert` plugin and use the new `imageInsert` button. See [#8034](https://github.com/ckeditor/ckeditor5/issues/8034). ([commit](https://github.com/ckeditor/ckeditor5/commit/48a9e943122e4cdd0e2647f03ebc7b17c402710e))
+* **[image](https://www.npmjs.com/package/@ckeditor/ckeditor5-image)**: The `config.image.upload.panel.items` option does not need to be set anymore in order to show the "insert image via URL form". It is enough to load the new `ImageInsert` plugin and use the new `insertImage` button. See [#8034](https://github.com/ckeditor/ckeditor5/issues/8034). ([commit](https://github.com/ckeditor/ckeditor5/commit/48a9e943122e4cdd0e2647f03ebc7b17c402710e))
* **[image](https://www.npmjs.com/package/@ckeditor/ckeditor5-image)**: Introduced `ImageInsert` as a standalone plugin that contains the `ImageUpload` functionality. Closes [#7890](https://github.com/ckeditor/ckeditor5/issues/7890). ([commit](https://github.com/ckeditor/ckeditor5/commit/4671ed10a4af4c507abd594414771b714ff31cf7))
* **[image](https://www.npmjs.com/package/@ckeditor/ckeditor5-image)**: The `ImageUploadPanelView` form label should change depending on whether the image is selected or not. Closes [#7878](https://github.com/ckeditor/ckeditor5/issues/7878). ([commit](https://github.com/ckeditor/ckeditor5/commit/288fb97e00181a130dd2833d6e3aa74bdab5b7cc))
* **[link](https://www.npmjs.com/package/@ckeditor/ckeditor5-link)**: The link plugin now comes with the autolink feature enabled by default. Closes [#7682](https://github.com/ckeditor/ckeditor5/issues/7682). ([commit](https://github.com/ckeditor/ckeditor5/commit/c9533f1752057fd833998a356282f8a625f4e39c))
diff --git a/docs/_snippets/examples/inline-editor.js b/docs/_snippets/examples/inline-editor.js
index 694a421b75b..7d811dde634 100644
--- a/docs/_snippets/examples/inline-editor.js
+++ b/docs/_snippets/examples/inline-editor.js
@@ -38,17 +38,17 @@ Array.from( inlineInjectElements ).forEach( inlineElement => {
config.image = {
resizeOptions: [
{
- name: 'imageResize:original',
+ name: 'resizeImage:original',
label: 'Original',
value: null
},
{
- name: 'imageResize:50',
+ name: 'resizeImage:50',
label: '50%',
value: '50'
},
{
- name: 'imageResize:75',
+ name: 'resizeImage:75',
label: '75%',
value: '75'
}
@@ -59,7 +59,7 @@ Array.from( inlineInjectElements ).forEach( inlineElement => {
'imageStyle:full',
'imageStyle:alignRight',
'|',
- 'imageResize',
+ 'resizeImage',
'|',
'imageTextAlternative'
]
diff --git a/docs/_snippets/examples/multi-root-editor.js b/docs/_snippets/examples/multi-root-editor.js
index b23a7c8f23d..d0a8c63240c 100644
--- a/docs/_snippets/examples/multi-root-editor.js
+++ b/docs/_snippets/examples/multi-root-editor.js
@@ -401,7 +401,7 @@ MultirootEditor
}, {
plugins: [ Essentials, Paragraph, Heading, Bold, Italic, List, Link, BlockQuote, Image, ImageCaption,
ImageStyle, ImageToolbar, ImageUpload, Table, TableToolbar, MediaEmbed, EasyImage ],
- toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'imageUpload', 'blockQuote',
+ toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'uploadImage', 'blockQuote',
'insertTable', 'mediaEmbed', 'undo', 'redo' ],
image: {
toolbar: [ 'imageTextAlternative', '|', 'imageStyle:full',
diff --git a/docs/builds/guides/integration/advanced-setup.md b/docs/builds/guides/integration/advanced-setup.md
index dd331f83412..f3805d56096 100644
--- a/docs/builds/guides/integration/advanced-setup.md
+++ b/docs/builds/guides/integration/advanced-setup.md
@@ -257,7 +257,7 @@ ClassicEditor.defaultConfig = {
'link',
'bulletedList',
'numberedList',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'undo',
'redo'
@@ -344,7 +344,7 @@ ClassicEditor
'link',
'bulletedList',
'numberedList',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'undo',
'redo'
diff --git a/docs/builds/guides/integration/installing-plugins.md b/docs/builds/guides/integration/installing-plugins.md
index 82cce989133..8a84e6e0b4c 100644
--- a/docs/builds/guides/integration/installing-plugins.md
+++ b/docs/builds/guides/integration/installing-plugins.md
@@ -106,7 +106,7 @@ ClassicEditor.defaultConfig = {
'link',
'bulletedList',
'numberedList',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'undo',
'redo'
diff --git a/docs/framework/guides/custom-editor-creator.md b/docs/framework/guides/custom-editor-creator.md
index 71892d5ae64..ad14644b4ea 100644
--- a/docs/framework/guides/custom-editor-creator.md
+++ b/docs/framework/guides/custom-editor-creator.md
@@ -450,7 +450,7 @@ MultirootEditor
}, {
plugins: [ Essentials, Paragraph, Heading, Bold, Italic, List, Link, BlockQuote, Image, ImageCaption,
ImageStyle, ImageToolbar, ImageUpload, Table, TableToolbar, MediaEmbed, EasyImage ],
- toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'imageUpload', 'blockQuote',
+ toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'uploadImage', 'blockQuote',
'insertTable', 'mediaEmbed', 'undo', 'redo' ],
image: {
toolbar: [ 'imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight' ],
diff --git a/packages/ckeditor5-adapter-ckfinder/tests/manual/uploadadapter.js b/packages/ckeditor5-adapter-ckfinder/tests/manual/uploadadapter.js
index c3a6a0a42bb..73606eb01e8 100644
--- a/packages/ckeditor5-adapter-ckfinder/tests/manual/uploadadapter.js
+++ b/packages/ckeditor5-adapter-ckfinder/tests/manual/uploadadapter.js
@@ -28,7 +28,7 @@ ClassicEditor
Enter, Typing, Paragraph, Heading, Undo, Bold, Italic, Heading, List, Image, ImageToolbar, Clipboard,
ImageCaption, ImageStyle, ImageUpload, CKFinderUploadAdapter
],
- toolbar: [ 'heading', '|', 'undo', 'redo', 'bold', 'italic', 'bulletedList', 'numberedList', 'imageUpload' ],
+ toolbar: [ 'heading', '|', 'undo', 'redo', 'bold', 'italic', 'bulletedList', 'numberedList', 'uploadImage' ],
ckfinder: {
// eslint-disable-next-line max-len
uploadUrl: 'https://cksource.com/weuy2g4ryt278ywiue/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json'
diff --git a/packages/ckeditor5-build-balloon-block/src/ckeditor.js b/packages/ckeditor5-build-balloon-block/src/ckeditor.js
index 9aa2961d6a3..e65d1bbc22e 100644
--- a/packages/ckeditor5-build-balloon-block/src/ckeditor.js
+++ b/packages/ckeditor5-build-balloon-block/src/ckeditor.js
@@ -74,7 +74,7 @@ BalloonEditor.defaultConfig = {
'indent',
'outdent',
'|',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'insertTable',
'mediaEmbed',
diff --git a/packages/ckeditor5-build-balloon/src/ckeditor.js b/packages/ckeditor5-build-balloon/src/ckeditor.js
index 41f741f8b0f..09ee4f6d0f5 100644
--- a/packages/ckeditor5-build-balloon/src/ckeditor.js
+++ b/packages/ckeditor5-build-balloon/src/ckeditor.js
@@ -74,7 +74,7 @@ BalloonEditor.defaultConfig = {
'indent',
'outdent',
'|',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'insertTable',
'mediaEmbed',
diff --git a/packages/ckeditor5-build-classic/src/ckeditor.js b/packages/ckeditor5-build-classic/src/ckeditor.js
index 7289c2e1c40..3d2d4359310 100644
--- a/packages/ckeditor5-build-classic/src/ckeditor.js
+++ b/packages/ckeditor5-build-classic/src/ckeditor.js
@@ -74,7 +74,7 @@ ClassicEditor.defaultConfig = {
'indent',
'outdent',
'|',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'insertTable',
'mediaEmbed',
diff --git a/packages/ckeditor5-build-decoupled-document/src/ckeditor.js b/packages/ckeditor5-build-decoupled-document/src/ckeditor.js
index a89cef6a75a..cf169139e6c 100644
--- a/packages/ckeditor5-build-decoupled-document/src/ckeditor.js
+++ b/packages/ckeditor5-build-decoupled-document/src/ckeditor.js
@@ -103,7 +103,7 @@ DecoupledEditor.defaultConfig = {
'|',
'link',
'blockquote',
- 'imageUpload',
+ 'uploadImage',
'insertTable',
'mediaEmbed',
'|',
diff --git a/packages/ckeditor5-build-inline/src/ckeditor.js b/packages/ckeditor5-build-inline/src/ckeditor.js
index 0b706f66554..97eba44f0fb 100644
--- a/packages/ckeditor5-build-inline/src/ckeditor.js
+++ b/packages/ckeditor5-build-inline/src/ckeditor.js
@@ -74,7 +74,7 @@ InlineEditor.defaultConfig = {
'indent',
'outdent',
'|',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'insertTable',
'mediaEmbed',
diff --git a/packages/ckeditor5-ckfinder/CHANGELOG.md b/packages/ckeditor5-ckfinder/CHANGELOG.md
index 940eb729491..09314bb4563 100644
--- a/packages/ckeditor5-ckfinder/CHANGELOG.md
+++ b/packages/ckeditor5-ckfinder/CHANGELOG.md
@@ -33,7 +33,7 @@ Internal changes only (updated dependencies, documentation, etc.).
### Bug fixes
-* CKFinderCommand should work when either `'link'` or `'imageInsert'` command is enabled. Closes [#48](https://github.com/ckeditor/ckeditor5-ckfinder/issues/48). ([d82a762](https://github.com/ckeditor/ckeditor5-ckfinder/commit/d82a762))
+* CKFinderCommand should work when either `'link'` or `'insertImage'` command is enabled. Closes [#48](https://github.com/ckeditor/ckeditor5-ckfinder/issues/48). ([d82a762](https://github.com/ckeditor/ckeditor5-ckfinder/commit/d82a762))
### Other changes
diff --git a/packages/ckeditor5-ckfinder/docs/_snippets/features/ckfinder-upload-only.js b/packages/ckeditor5-ckfinder/docs/_snippets/features/ckfinder-upload-only.js
index a1f2f767545..0cfe46e23c5 100644
--- a/packages/ckeditor5-ckfinder/docs/_snippets/features/ckfinder-upload-only.js
+++ b/packages/ckeditor5-ckfinder/docs/_snippets/features/ckfinder-upload-only.js
@@ -9,7 +9,7 @@ ClassicEditor
.create( document.querySelector( '#snippet-ckfinder-upload-only' ), {
toolbar: {
items: [
- 'imageUpload', '|', 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo'
+ 'uploadImage', '|', 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo'
],
viewportTopOffset: 100
},
diff --git a/packages/ckeditor5-ckfinder/docs/features/ckfinder.md b/packages/ckeditor5-ckfinder/docs/features/ckfinder.md
index 4928d39ff89..f1c110daf8a 100644
--- a/packages/ckeditor5-ckfinder/docs/features/ckfinder.md
+++ b/packages/ckeditor5-ckfinder/docs/features/ckfinder.md
@@ -72,7 +72,7 @@ ClassicEditor
plugins: [ CKFinder, ... ],
// Enable the "Insert image" button in the toolbar.
- toolbar: [ 'imageUpload', ... ],
+ toolbar: [ 'uploadImage', ... ],
ckfinder: {
// Upload the images to the server using the CKFinder QuickUpload command.
@@ -189,7 +189,7 @@ import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ CKFinder, ... ],
- toolbar: [ 'ckfinder', 'imageUpload' ... ], // Depending on your preference.
+ toolbar: [ 'ckfinder', 'uploadImage' ... ], // Depending on your preference.
ckfinder: {
// Feature configuration.
}
@@ -213,8 +213,8 @@ The {@link module:ckfinder/ckfinder~CKFinder} plugin registers:
Additionally, in the "image upload only" integration, you can use the following button and command registered by the {@link module:image/imageupload~ImageUpload} plugin:
-* The `'imageUpload'` UI button component.
-* The `'imageUpload'` command implemented by the {@link module:image/imageupload/imageuploadcommand~ImageUploadCommand}.
+* The `'uploadImage'` UI button component.
+* The `'uploadImage'` command implemented by the {@link module:image/imageupload/uploadimagecommand~UploadImageCommand}.
We recommend using the official {@link framework/guides/development-tools#ckeditor-5-inspector CKEditor 5 inspector} for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.
diff --git a/packages/ckeditor5-ckfinder/src/ckfindercommand.js b/packages/ckeditor5-ckfinder/src/ckfindercommand.js
index 551b36e16f4..7a35a90cbb8 100644
--- a/packages/ckeditor5-ckfinder/src/ckfindercommand.js
+++ b/packages/ckeditor5-ckfinder/src/ckfindercommand.js
@@ -19,7 +19,7 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
* editor.execute( 'ckfinder' );
*
* **Note:** This command uses other features to perform tasks:
- * - To insert images the {@link module:image/image/imageinsertcommand~ImageInsertCommand 'imageInsert'} command
+ * - To insert images the {@link module:image/image/insertimagecommand~InsertImageCommand 'insertImage'} command
* from the {@link module:image/image~Image Image feature}.
* - To insert links to files the {@link module:link/linkcommand~LinkCommand 'link'} command
* from the {@link module:link/link~Link Link feature}.
@@ -44,7 +44,7 @@ export default class CKFinderCommand extends Command {
* @inheritDoc
*/
refresh() {
- const imageCommand = this.editor.commands.get( 'imageInsert' );
+ const imageCommand = this.editor.commands.get( 'insertImage' );
const linkCommand = this.editor.commands.get( 'link' );
// The CKFinder command is enabled when one of image or link command is enabled.
@@ -135,7 +135,7 @@ export default class CKFinderCommand extends Command {
}
function insertImages( editor, urls ) {
- const imageCommand = editor.commands.get( 'imageInsert' );
+ const imageCommand = editor.commands.get( 'insertImage' );
// Check if inserting an image is actually possible - it might be possible to only insert a link.
if ( !imageCommand.isEnabled ) {
@@ -150,5 +150,5 @@ function insertImages( editor, urls ) {
return;
}
- editor.execute( 'imageInsert', { source: urls } );
+ editor.execute( 'insertImage', { source: urls } );
}
diff --git a/packages/ckeditor5-ckfinder/tests/ckfindercommand.js b/packages/ckeditor5-ckfinder/tests/ckfindercommand.js
index f4793098ac9..659392686cd 100644
--- a/packages/ckeditor5-ckfinder/tests/ckfindercommand.js
+++ b/packages/ckeditor5-ckfinder/tests/ckfindercommand.js
@@ -105,9 +105,9 @@ describe( 'CKFinderCommand', () => {
expect( command.isEnabled ).to.be.false;
} );
- it( 'should be true when imageInsert or link command is enabled', () => {
+ it( 'should be true when insertImage or link command is enabled', () => {
setModelData( model, '[]' );
- const insertImage = editor.commands.get( 'imageInsert' );
+ const insertImage = editor.commands.get( 'insertImage' );
const linkCommand = editor.commands.get( 'link' );
insertImage.isEnabled = false;
diff --git a/packages/ckeditor5-core/src/command.js b/packages/ckeditor5-core/src/command.js
index f822727b125..7b469d85276 100644
--- a/packages/ckeditor5-core/src/command.js
+++ b/packages/ckeditor5-core/src/command.js
@@ -45,7 +45,7 @@ export default class Command {
* For example, the `'bold'` command's value indicates whether the selection starts in a bolded text.
* And the value of the `'link'` command may be an object with links details.
*
- * It is possible for a command to have no value (e.g. for stateless actions such as `'imageUpload'`).
+ * It is possible for a command to have no value (e.g. for stateless actions such as `'uploadImage'`).
*
* A concrete command class should control this value by overriding the {@link #refresh `refresh()`} method.
*
diff --git a/packages/ckeditor5-easy-image/docs/features/easy-image.md b/packages/ckeditor5-easy-image/docs/features/easy-image.md
index c64a10e1db3..e47c85d893d 100644
--- a/packages/ckeditor5-easy-image/docs/features/easy-image.md
+++ b/packages/ckeditor5-easy-image/docs/features/easy-image.md
@@ -132,7 +132,7 @@ import EasyImage from '@ckeditor/ckeditor5-easy-image/src/easyimage';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ EasyImage, ... ],
- toolbar: [ 'imageUpload', ... ],
+ toolbar: [ 'uploadImage', ... ],
// Configure the endpoint. See the "Configuration" section above.
cloudServices: {
diff --git a/packages/ckeditor5-easy-image/tests/easyimage.js b/packages/ckeditor5-easy-image/tests/easyimage.js
index 79fcf2b8aac..0c2108deb8c 100644
--- a/packages/ckeditor5-easy-image/tests/easyimage.js
+++ b/packages/ckeditor5-easy-image/tests/easyimage.js
@@ -122,7 +122,7 @@ describe( 'EasyImage', () => {
}
} );
- editor.execute( 'imageUpload', { file: createNativeFileMock() } );
+ editor.execute( 'uploadImage', { file: createNativeFileMock() } );
setTimeout( () => {
upload._uploadGateway.resolveLastUpload();
diff --git a/packages/ckeditor5-easy-image/tests/manual/easyimage.js b/packages/ckeditor5-easy-image/tests/manual/easyimage.js
index 68ef38b891d..7e445363ab2 100644
--- a/packages/ckeditor5-easy-image/tests/manual/easyimage.js
+++ b/packages/ckeditor5-easy-image/tests/manual/easyimage.js
@@ -25,7 +25,7 @@ ClassicEditor
'bulletedList',
'numberedList',
'blockQuote',
- 'imageUpload',
+ 'uploadImage',
'insertTable',
'mediaEmbed',
'undo',
diff --git a/packages/ckeditor5-heading/docs/_snippets/features/title.js b/packages/ckeditor5-heading/docs/_snippets/features/title.js
index 3baa5639c5d..6cc3d0af9fc 100644
--- a/packages/ckeditor5-heading/docs/_snippets/features/title.js
+++ b/packages/ckeditor5-heading/docs/_snippets/features/title.js
@@ -22,7 +22,7 @@ BaloonBlockEditor
'outdent',
'indent',
'|',
- 'imageUpload',
+ 'uploadImage',
'blockQuote',
'insertTable',
'mediaEmbed'
diff --git a/packages/ckeditor5-heading/tests/manual/title.js b/packages/ckeditor5-heading/tests/manual/title.js
index e7826aa0173..99213b53be6 100644
--- a/packages/ckeditor5-heading/tests/manual/title.js
+++ b/packages/ckeditor5-heading/tests/manual/title.js
@@ -21,7 +21,7 @@ import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';
ClassicEditor
.create( document.querySelector( '#editor1' ), {
plugins: [ Enter, Typing, Undo, Heading, Title, Clipboard, Image, ImageUpload, Bold, Alignment ],
- toolbar: [ 'heading', '|', 'undo', 'redo', 'bold', 'imageUpload', 'alignment' ]
+ toolbar: [ 'heading', '|', 'undo', 'redo', 'bold', 'uploadImage', 'alignment' ]
} )
.then( editor => {
window.editor = editor;
@@ -35,7 +35,7 @@ ClassicEditor
ClassicEditor
.create( document.querySelector( '#editor2' ), {
plugins: [ Enter, Typing, Undo, Heading, Title, Clipboard, Image, ImageUpload, Bold, Alignment ],
- toolbar: [ 'heading', '|', 'undo', 'redo', 'bold', 'imageUpload', 'alignment' ],
+ toolbar: [ 'heading', '|', 'undo', 'redo', 'bold', 'uploadImage', 'alignment' ],
placeholder: 'Custom body placeholder',
title: {
placeholder: 'Custom title placeholder'
diff --git a/packages/ckeditor5-horizontal-line/docs/_snippets/features/horizontal-line.js b/packages/ckeditor5-horizontal-line/docs/_snippets/features/horizontal-line.js
index 48310eec928..e2d05bc910d 100644
--- a/packages/ckeditor5-horizontal-line/docs/_snippets/features/horizontal-line.js
+++ b/packages/ckeditor5-horizontal-line/docs/_snippets/features/horizontal-line.js
@@ -32,7 +32,7 @@ ClassicEditor
'horizontalLine',
'blockQuote',
'link',
- 'imageUpload',
+ 'uploadImage',
'mediaEmbed',
'insertTable',
'|',
diff --git a/packages/ckeditor5-horizontal-line/tests/horizontallineediting.js b/packages/ckeditor5-horizontal-line/tests/horizontallineediting.js
index 4e366863542..a118b452fd1 100644
--- a/packages/ckeditor5-horizontal-line/tests/horizontallineediting.js
+++ b/packages/ckeditor5-horizontal-line/tests/horizontallineediting.js
@@ -46,7 +46,7 @@ describe( 'HorizontalLineEditing', () => {
expect( model.schema.checkChild( [ '$root', '$block' ], 'horizontalLine' ) ).to.be.false;
} );
- it( 'should register imageInsert command', () => {
+ it( 'should register horizontalLine command', () => {
expect( editor.commands.get( 'horizontalLine' ) ).to.be.instanceOf( HorizontalLineCommand );
} );
diff --git a/packages/ckeditor5-horizontal-line/tests/manual/horizontalline.js b/packages/ckeditor5-horizontal-line/tests/manual/horizontalline.js
index 16a31e778a0..0d9ebea3f61 100644
--- a/packages/ckeditor5-horizontal-line/tests/manual/horizontalline.js
+++ b/packages/ckeditor5-horizontal-line/tests/manual/horizontalline.js
@@ -21,7 +21,7 @@ ClassicEditor
'|',
'bold', 'italic', 'numberedList', 'bulletedList',
'|',
- 'link', 'blockquote', 'imageUpload', 'insertTable', 'mediaEmbed',
+ 'link', 'blockquote', 'uploadImage', 'insertTable', 'mediaEmbed',
'|',
'undo', 'redo',
'|',
diff --git a/packages/ckeditor5-html-embed/docs/_snippets/features/html-embed.js b/packages/ckeditor5-html-embed/docs/_snippets/features/html-embed.js
index 68ca1d7e14e..6d560d3b026 100644
--- a/packages/ckeditor5-html-embed/docs/_snippets/features/html-embed.js
+++ b/packages/ckeditor5-html-embed/docs/_snippets/features/html-embed.js
@@ -69,7 +69,7 @@ async function reloadEditor( config = {} ) {
'|',
'blockQuote',
'link',
- 'imageUpload',
+ 'uploadImage',
'mediaEmbed',
'insertTable',
'htmlEmbed',
diff --git a/packages/ckeditor5-image/CHANGELOG.md b/packages/ckeditor5-image/CHANGELOG.md
index 39c89121927..86cf765ff73 100644
--- a/packages/ckeditor5-image/CHANGELOG.md
+++ b/packages/ckeditor5-image/CHANGELOG.md
@@ -159,7 +159,7 @@ Internal changes only (updated dependencies, documentation, etc.).
### Features
* Improved responsiveness of the text alternative view in narrow viewports (see [ckeditor/ckeditor5#416](https://github.com/ckeditor/ckeditor5/issues/416)). ([ff5394a](https://github.com/ckeditor/ckeditor5-image/commit/ff5394a))
-* Introduced the `'imageInsert'` command. Closes [#245](https://github.com/ckeditor/ckeditor5-image/issues/245). Closes [#251](https://github.com/ckeditor/ckeditor5-image/issues/251). ([cc1e7a3](https://github.com/ckeditor/ckeditor5-image/commit/cc1e7a3))
+* Introduced the `'insertImage'` command. Closes [#245](https://github.com/ckeditor/ckeditor5-image/issues/245). Closes [#251](https://github.com/ckeditor/ckeditor5-image/issues/251). ([cc1e7a3](https://github.com/ckeditor/ckeditor5-image/commit/cc1e7a3))
* Support for uploading images pasted with a base64 source. Closes [#246](https://github.com/ckeditor/ckeditor5-image/issues/246). Closes [ckeditor/ckeditor5-paste-from-office#24](https://github.com/ckeditor/ckeditor5-paste-from-office/issues/24). ([89ab27e](https://github.com/ckeditor/ckeditor5-image/commit/89ab27e))
### Bug fixes
@@ -176,7 +176,7 @@ Internal changes only (updated dependencies, documentation, etc.).
### BREAKING CHANGES
-* The `ImageUploadCommand#execute()`'s `files` parameter was renamed to `file`. It can still accept an array of files.
+* The `UploadImageCommand#execute()`'s `files` parameter was renamed to `file`. It can still accept an array of files.
## [11.0.0](https://github.com/ckeditor/ckeditor5-image/compare/v10.2.0...v11.0.0) (2018-10-08)
@@ -185,13 +185,13 @@ Internal changes only (updated dependencies, documentation, etc.).
* Aligned `ImageToolbar` to use the new widget toolbar repository. ([980681d](https://github.com/ckeditor/ckeditor5-image/commit/980681d))
* Image feature should insert image the same way as other widget features do. ([26638f5](https://github.com/ckeditor/ckeditor5-image/commit/26638f5))
-* The `ImageUploadCommand` should check whether it can be executed in the context of the current document selection. Closes [#225](https://github.com/ckeditor/ckeditor5-image/issues/225). Closes [#227](https://github.com/ckeditor/ckeditor5-image/issues/227). Closes [#235](https://github.com/ckeditor/ckeditor5-image/issues/235). ([4c1f27f](https://github.com/ckeditor/ckeditor5-image/commit/4c1f27f))
+* The `UploadImageCommand` should check whether it can be executed in the context of the current document selection. Closes [#225](https://github.com/ckeditor/ckeditor5-image/issues/225). Closes [#227](https://github.com/ckeditor/ckeditor5-image/issues/227). Closes [#235](https://github.com/ckeditor/ckeditor5-image/issues/235). ([4c1f27f](https://github.com/ckeditor/ckeditor5-image/commit/4c1f27f))
* Updated translations. ([59f3604](https://github.com/ckeditor/ckeditor5-image/commit/59f3604))
### BREAKING CHANGES
-* The `options.file` property was renamed to `options.files` in `ImageUploadCommand#execute()`.
-* The `options.insertAt` property of `ImageUploadCommand#execute()` was removed. The command will now use model's selection.
+* The `options.file` property was renamed to `options.files` in `UploadImageCommand#execute()`.
+* The `options.insertAt` property of `UploadImageCommand#execute()` was removed. The command will now use model's selection.
* Removed `findOptimalInsertionPosition()` from utils. This method can now be found in the `@ckeditor/ckeditor5-widget/src/utils` module.
@@ -222,7 +222,7 @@ Internal changes only (updated dependencies, documentation, etc.).
### Bug fixes
-* Made image upload by drag&drop work when the `ImageUploadCommand` is disabled. Closes [#208](https://github.com/ckeditor/ckeditor5-image/issues/208). ([6908ec6](https://github.com/ckeditor/ckeditor5-image/commit/6908ec6))
+* Made image upload by drag&drop work when the `UploadImageCommand` is disabled. Closes [#208](https://github.com/ckeditor/ckeditor5-image/issues/208). ([6908ec6](https://github.com/ckeditor/ckeditor5-image/commit/6908ec6))
### Other changes
diff --git a/packages/ckeditor5-image/docs/_snippets/features/image-insert-via-url.js b/packages/ckeditor5-image/docs/_snippets/features/image-insert-via-url.js
index 0b662bd3849..0d6e90e13a2 100644
--- a/packages/ckeditor5-image/docs/_snippets/features/image-insert-via-url.js
+++ b/packages/ckeditor5-image/docs/_snippets/features/image-insert-via-url.js
@@ -9,7 +9,7 @@ import { CS_CONFIG } from '@ckeditor/ckeditor5-cloud-services/tests/_utils/cloud
const toolbarItems = [ ...ClassicEditor.defaultConfig.toolbar.items ];
-toolbarItems.splice( toolbarItems.indexOf( 'imageUpload' ), 1, 'imageInsert' );
+toolbarItems.splice( toolbarItems.indexOf( 'uploadImage' ), 1, 'insertImage' );
ClassicEditor
.create( document.querySelector( '#snippet-image-insert-via-url' ), {
diff --git a/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons-dropdown.js b/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons-dropdown.js
index 80712c8daed..d36a00bf3e3 100644
--- a/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons-dropdown.js
+++ b/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons-dropdown.js
@@ -16,17 +16,17 @@ ClassicEditor
image: {
resizeOptions: [
{
- name: 'imageResize:original',
+ name: 'resizeImage:original',
label: 'Original',
value: null
},
{
- name: 'imageResize:50',
+ name: 'resizeImage:50',
label: '50%',
value: '50'
},
{
- name: 'imageResize:75',
+ name: 'resizeImage:75',
label: '75%',
value: '75'
}
@@ -41,7 +41,7 @@ ClassicEditor
'imageStyle:alignCenter',
'imageStyle:alignRight',
'|',
- 'imageResize'
+ 'resizeImage'
]
},
cloudServices: CS_CONFIG
diff --git a/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons.js b/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons.js
index cac84a746a0..cb0926b07b8 100644
--- a/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons.js
+++ b/packages/ckeditor5-image/docs/_snippets/features/image-resize-buttons.js
@@ -16,19 +16,19 @@ ClassicEditor
image: {
resizeOptions: [
{
- name: 'imageResize:original',
+ name: 'resizeImage:original',
label: 'Original',
value: null,
icon: 'original'
},
{
- name: 'imageResize:50',
+ name: 'resizeImage:50',
label: '50%',
value: '50',
icon: 'medium'
},
{
- name: 'imageResize:75',
+ name: 'resizeImage:75',
label: '75%',
value: '75',
icon: 'large'
@@ -44,9 +44,9 @@ ClassicEditor
'imageStyle:alignCenter',
'imageStyle:alignRight',
'|',
- 'imageResize:50',
- 'imageResize:75',
- 'imageResize:original'
+ 'resizeImage:50',
+ 'resizeImage:75',
+ 'resizeImage:original'
]
},
cloudServices: CS_CONFIG
diff --git a/packages/ckeditor5-image/docs/_snippets/features/image-resize-px.js b/packages/ckeditor5-image/docs/_snippets/features/image-resize-px.js
index e51cae24a0d..da749714fa9 100644
--- a/packages/ckeditor5-image/docs/_snippets/features/image-resize-px.js
+++ b/packages/ckeditor5-image/docs/_snippets/features/image-resize-px.js
@@ -14,17 +14,17 @@ ClassicEditor
resizeUnit: 'px',
resizeOptions: [
{
- name: 'imageResize:original',
+ name: 'resizeImage:original',
label: 'Original',
value: null
},
{
- name: 'imageResize:250',
+ name: 'resizeImage:250',
label: '250px',
value: '250'
},
{
- name: 'imageResize:400',
+ name: 'resizeImage:400',
label: '400px',
value: '400'
}
@@ -39,7 +39,7 @@ ClassicEditor
'imageStyle:alignCenter',
'imageStyle:alignRight',
'|',
- 'imageResize'
+ 'resizeImage'
]
},
toolbar: {
diff --git a/packages/ckeditor5-image/docs/_snippets/features/image-style-presentational.js b/packages/ckeditor5-image/docs/_snippets/features/image-style-presentational.js
index d70e7f4b449..6de01479a64 100644
--- a/packages/ckeditor5-image/docs/_snippets/features/image-style-presentational.js
+++ b/packages/ckeditor5-image/docs/_snippets/features/image-style-presentational.js
@@ -18,17 +18,17 @@ ClassicEditor
],
resizeOptions: [
{
- name: 'imageResize:original',
+ name: 'resizeImage:original',
label: 'Original',
value: null
},
{
- name: 'imageResize:50',
+ name: 'resizeImage:50',
label: '50%',
value: '50'
},
{
- name: 'imageResize:75',
+ name: 'resizeImage:75',
label: '75%',
value: '75'
}
@@ -38,7 +38,7 @@ ClassicEditor
'imageStyle:alignCenter',
'imageStyle:alignRight',
'|',
- 'imageResize',
+ 'resizeImage',
'|',
'imageTextAlternative'
]
diff --git a/packages/ckeditor5-image/docs/features/image.md b/packages/ckeditor5-image/docs/features/image.md
index 1e5e97c030e..2971b708cbb 100644
--- a/packages/ckeditor5-image/docs/features/image.md
+++ b/packages/ckeditor5-image/docs/features/image.md
@@ -89,7 +89,7 @@ See the {@link features/image-upload Image upload} guide.
Besides the ability to insert images by uploading them directly from your disk or via CKFinder, you can also configure CKEditor 5 to allow inserting images via source URL.
-In order to enable this option, install the `ImageInsert` plugin and add the `imageInsert` button to the toolbar (it replaces the standard `imageUpload` button).
+In order to enable this option, install the `ImageInsert` plugin and add the `insertImage` button to the toolbar (it replaces the standard `uploadImage` button).
```js
import ImageInsert from '@ckeditor/ckeditor5-image/src/imageinsert';
@@ -97,7 +97,7 @@ import ImageInsert from '@ckeditor/ckeditor5-image/src/imageinsert';
ClassicEditor
.create( document.querySelector( '#editor' ), {
plugins: [ ... , ImageInsert ],
- toolbar: [ ... , 'imageInsert' ]
+ toolbar: [ ... , 'insertImage' ]
} )
```
@@ -212,17 +212,17 @@ ClassicEditor
// Configure the available image resize options.
resizeOptions: [
{
- name: 'imageResize:original',
+ name: 'resizeImage:original',
label: 'Original',
value: null
},
{
- name: 'imageResize:50',
+ name: 'resizeImage:50',
label: '50%',
value: '50'
},
{
- name: 'imageResize:75',
+ name: 'resizeImage:75',
label: '75%',
value: '75'
}
@@ -233,7 +233,7 @@ ClassicEditor
toolbar: [
'imageStyle:alignLeft', 'imageStyle:alignCenter', 'imageStyle:alignRight',
'|',
- 'imageResize',
+ 'resizeImage',
'|',
'imageTextAlternative'
]
@@ -245,7 +245,7 @@ ClassicEditor
The code sample above uses predefined presentational image styles: `'alignLeft'`, `'alignCenter'` and `'alignRight'`. They apply, respectively, the `.image-style-align-left`, `.image-style-align-center` and `.image-style-align-right` classes to the `