8
0
Piotrek Koszuliński 7 лет назад
Родитель
Сommit
e8c62b43ae

+ 2 - 15
packages/ckeditor5-image/docs/features/image.md

@@ -40,20 +40,6 @@ You can see the demo of an editor with the base image feature enabled below:
 	The base image feature, unlike in CKEditor 4, does not support any user interface for inserting or managing images. Its sole purpose is to lay ground for other plugins (mentioned above) to build the target user experience. This pattern (composition of atomic features) is common for CKEditor 5 and allows the developers to build their own customized experience by implementing specific subfeatures differently.
 </info-box>
 
-### Image insert command
-
-The Image feature introduces the {@link module:image/image/imageinsertcommand~ImageInsertCommand `'imageInsert'` command. The command accepts one parameter `source` of image to insert:
-
-```js
-editor.execute( 'imageInsert', { source: '/path/to/image.jpg' } );
-```
-
-The command can be also used to insert multiple images at once by passing an array of sources:
-
-```js
-editor.execute( 'imageInsert', { source: [ '/path/to/image1.jpg', '/path/to/image2.jpg' ] } );
-```
-
 ## Image contextual toolbar
 
 The {@link module:image/imagetoolbar~ImageToolbar} plugin introduces a contextual toolbar for images. The toolbar appears when an image is selected and can be configured to contain any buttons you want. Usually, these will be image-related options such as the text alternative (which is introduced by the base image plugin) button and [image styles buttons](#image-styles).
@@ -227,7 +213,8 @@ ClassicEditor
 The {@link module:image/image~Image} plugin registers:
 
 * The `'imageTextAlternative'` button.
-* * The {@link module:image/imagetextalternative/imagetextalternativecommand~ImageTextAlternativeCommand `'imageTextAlternative'` command}
+* The {@link module:image/imagetextalternative/imagetextalternativecommand~ImageTextAlternativeCommand `'imageTextAlternative'` command}
+* The {@link module:image/image/imageinsertcommand~ImageInsertCommand `'imageInsert'` command} which accepts a source (e.g. an URL) of an image to insert.
 
 The {@link module:image/imagestyle~ImageStyle} plugin registers:
 

+ 4 - 3
packages/ckeditor5-image/src/image/imageinsertcommand.js

@@ -13,14 +13,15 @@ import { insertImage, isImageAllowed } from './utils';
 /**
  * Insert image command.
  *
- * The command is registered by the {@link module:image/image/imageediting~ImageEditing} as `'imageInsert'`.
+ * The command is registered by the {@link module:image/image/imageediting~ImageEditing} plugin as `'imageInsert'`.
  *
- * To insert image at the current selection (according to the {@link module:widget/utils~findOptimalInsertionPosition} algorithm),
+ * In order to insert an image at the current selection position
+ * (according to the {@link module:widget/utils~findOptimalInsertionPosition} algorithm),
  * execute the command and specify the image source:
  *
  *		editor.execute( 'imageInsert', { source: 'http://url.to.the/image' } );
  *
- *	It is also possible to insert multiple images at once:
+ * It is also possible to insert multiple images at once:
  *
  *		editor.execute( 'imageInsert', {
  *			source:  [

+ 4 - 3
packages/ckeditor5-image/src/imageupload/imageuploadcommand.js

@@ -14,9 +14,10 @@ import { insertImage, isImageAllowed } from '../image/utils';
 /**
  * Image upload command.
  *
- * The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} as `'imageUpload'`.
+ * The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin as `'imageUpload'`.
  *
- * To upload an image at the current selection (according to the {@link module:widget/utils~findOptimalInsertionPosition} algorithm),
+ * In order to upload an image at the current selection position
+ * (according to the {@link module:widget/utils~findOptimalInsertionPosition} algorithm),
  * execute the command and pass the native image file instance:
  *
  *		this.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {
@@ -27,7 +28,7 @@ import { insertImage, isImageAllowed } from '../image/utils';
  *			editor.execute( 'imageUpload', { file: images[ 0 ] } );
  *		} );
  *
- *	It is also possible to insert multiple images at once:
+ * It is also possible to insert multiple images at once:
  *
  *		editor.execute( 'imageUpload', {
  *			file: [