瀏覽代碼

Merge branch 'stable'

Piotrek Koszuliński 7 年之前
父節點
當前提交
1cbfbe15b0
共有 27 個文件被更改,包括 129 次插入119 次删除
  1. 4 1
      packages/ckeditor5-image/docs/api/image.md
  2. 26 25
      packages/ckeditor5-image/docs/features/image.md
  3. 4 2
      packages/ckeditor5-image/src/image.js
  4. 1 1
      packages/ckeditor5-image/src/image/converters.js
  5. 2 2
      packages/ckeditor5-image/src/image/imageediting.js
  6. 3 3
      packages/ckeditor5-image/src/image/ui/utils.js
  7. 4 4
      packages/ckeditor5-image/src/image/utils.js
  8. 2 0
      packages/ckeditor5-image/src/imagecaption.js
  9. 11 11
      packages/ckeditor5-image/src/imagecaption/imagecaptionediting.js
  10. 6 4
      packages/ckeditor5-image/src/imagestyle.js
  11. 2 2
      packages/ckeditor5-image/src/imagestyle/converters.js
  12. 2 2
      packages/ckeditor5-image/src/imagestyle/imagestylecommand.js
  13. 7 7
      packages/ckeditor5-image/src/imagestyle/imagestyleediting.js
  14. 1 1
      packages/ckeditor5-image/src/imagestyle/imagestyleui.js
  15. 12 12
      packages/ckeditor5-image/src/imagestyle/utils.js
  16. 1 1
      packages/ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.js
  17. 1 2
      packages/ckeditor5-image/src/imagetextalternative/imagetextalternativeui.js
  18. 1 1
      packages/ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.js
  19. 10 11
      packages/ckeditor5-image/src/imagetoolbar.js
  20. 4 2
      packages/ckeditor5-image/src/imageupload.js
  21. 5 5
      packages/ckeditor5-image/src/imageupload/imageuploadcommand.js
  22. 3 3
      packages/ckeditor5-image/src/imageupload/imageuploadediting.js
  23. 5 5
      packages/ckeditor5-image/src/imageupload/imageuploadprogress.js
  24. 2 2
      packages/ckeditor5-image/src/imageupload/imageuploadui.js
  25. 8 8
      packages/ckeditor5-image/src/imageupload/utils.js
  26. 1 1
      packages/ckeditor5-image/theme/image.css
  27. 1 1
      packages/ckeditor5-image/theme/imageuploadprogress.css

+ 4 - 1
packages/ckeditor5-image/docs/api/image.md

@@ -13,9 +13,12 @@ This package implements the image feature for CKEditor 5. The feature is introdu
 See the {@link features/image Image feature} guide and the documentation for the following plugins:
 
 * {@link module:image/image~Image}
-* {@link module:image/imagetoolbar~ImageToolbar}
 * {@link module:image/imagecaption~ImageCaption}
 * {@link module:image/imagestyle~ImageStyle}
+* {@link module:image/imagetextalternative~ImageTextAlternative}
+* {@link module:image/imagetoolbar~ImageToolbar}
+* {@link module:image/imageupload~ImageUpload}
+
 
 ## Installation
 

文件差異過大導致無法顯示
+ 26 - 25
packages/ckeditor5-image/docs/features/image.md


+ 4 - 2
packages/ckeditor5-image/src/image.js

@@ -19,6 +19,8 @@ import '../theme/image.css';
  *
  * Uses the {@link module:image/image/imageediting~ImageEditing}.
  *
+ * For a detailed overview, check the {@glink features/image image feature} documentation.
+ *
  * @extends module:core/plugin~Plugin
  */
 export default class Image extends Plugin {
@@ -38,7 +40,7 @@ export default class Image extends Plugin {
 }
 
 /**
- * The configuration of the image features. Used by the image features in `@ckeditor/ckeditor5-image` package.
+ * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.
  *
  * Read more in {@link module:image/image~ImageConfig}.
  *
@@ -46,7 +48,7 @@ export default class Image extends Plugin {
  */
 
 /**
- * The configuration of the image features. Used by the image features in `@ckeditor/ckeditor5-image` package.
+ * The configuration of the image features. Used by the image features in the `@ckeditor/ckeditor5-image` package.
  *
  *		ClassicEditor
  *			.create( editorElement, {

+ 1 - 1
packages/ckeditor5-image/src/image/converters.js

@@ -66,7 +66,7 @@ export function viewFigureToModel() {
 }
 
 /**
- * Converter used to convert `srcset` model image's attribute to `srcset`, `sizes` and `width` attributes in the view.
+ * Converter used to convert the `srcset` model image attribute to the `srcset`, `sizes` and `width` attributes in the view.
  *
  * @return {Function}
  */

+ 2 - 2
packages/ckeditor5-image/src/image/imageediting.js

@@ -24,8 +24,8 @@ import ViewPosition from '@ckeditor/ckeditor5-engine/src/view/position';
 
 /**
  * The image engine plugin.
- * Registers `<image>` as a block element in the document schema, and allows `alt`, `src` and `srcset` attributes.
- * Registers converters for editing and data pipelines.
+ * It registers `<image>` as a block element in the document schema, and allows `alt`, `src` and `srcset` attributes.
+ * It also egisters converters for editing and data pipelines.
  *
  * @extends module:core/plugin~Plugin
  */

+ 3 - 3
packages/ckeditor5-image/src/image/ui/utils.js

@@ -11,8 +11,8 @@ import BalloonPanelView from '@ckeditor/ckeditor5-ui/src/panel/balloon/balloonpa
 import { isImageWidgetSelected } from '../utils';
 
 /**
- * A helper utility which positions the
- * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon} instance
+ * A helper utility that positions the
+ * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} instance
  * with respect to the image in the editor content, if one is selected.
  *
  * @param {module:core/editor/editor~Editor} editor The editor instance.
@@ -29,7 +29,7 @@ export function repositionContextualBalloon( editor ) {
 
 /**
  * Returns the positioning options that control the geometry of the
- * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}, with respect
+ * {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon contextual balloon} with respect
  * to the selected element in the editor content.
  *
  * @param {module:core/editor/editor~Editor} editor The editor instance.

+ 4 - 4
packages/ckeditor5-image/src/image/utils.js

@@ -14,12 +14,12 @@ const imageSymbol = Symbol( 'isImage' );
 
 /**
  * Converts a given {@link module:engine/view/element~Element} to an image widget:
- * * adds a {@link module:engine/view/element~Element#_setCustomProperty custom property} allowing to recognize the image widget element,
- * * calls the {@link module:widget/utils~toWidget toWidget} function with the proper element's label creator.
+ * * Adds a {@link module:engine/view/element~Element#_setCustomProperty custom property} allowing to recognize the image widget element.
+ * * Calls the {@link module:widget/utils~toWidget} function with the proper element's label creator.
  *
  * @param {module:engine/view/element~Element} viewElement
- * @param {module:engine/view/writer~Writer} writer Instance of view writer.
- * @param {String} label Element's label. It will be concatenated with the image `alt` attribute if one is present.
+ * @param {module:engine/view/writer~Writer} writer An instance of the view writer.
+ * @param {String} label The element's label. It will be concatenated with the image `alt` attribute if one is present.
  * @returns {module:engine/view/element~Element}
  */
 export function toImageWidget( viewElement, writer, label ) {

+ 2 - 0
packages/ckeditor5-image/src/imagecaption.js

@@ -15,6 +15,8 @@ import '../theme/imagecaption.css';
 /**
  * The image caption plugin.
  *
+ * For a detailed overview, check the {@glink features/image#image-captions image caption} documentation.
+ *
  * @extends module:core/plugin~Plugin
  */
 export default class ImageCaption extends Plugin {

+ 11 - 11
packages/ckeditor5-image/src/imagecaption/imagecaptionediting.js

@@ -38,7 +38,7 @@ export default class ImageCaptionEditing extends Plugin {
 		const t = editor.t;
 
 		/**
-		 * Last selected caption editable.
+		 * The last selected caption editable.
 		 * It is used for hiding the editable when it is empty and the image widget is no longer selected.
 		 *
 		 * @private
@@ -89,7 +89,7 @@ export default class ImageCaptionEditing extends Plugin {
 	 *
 	 * @private
 	 * @param {module:engine/view/writer~Writer} viewWriter
-	 * @returns {Boolean} Returns `true` when view is updated.
+	 * @returns {Boolean} Returns `true` when the view is updated.
 	 */
 	_updateCaptionVisibility( viewWriter ) {
 		const mapper = this.editor.editing.mapper;
@@ -144,7 +144,7 @@ export default class ImageCaptionEditing extends Plugin {
 	}
 
 	/**
-	 * Returns converter that fixes caption visibility during the model-to-view conversion.
+	 * Returns a converter that fixes caption visibility during the model-to-view conversion.
 	 * Checks if the changed node is placed inside the caption element and fixes its visibility in the view.
 	 *
 	 * @private
@@ -173,12 +173,12 @@ export default class ImageCaptionEditing extends Plugin {
 	}
 
 	/**
-	 * Checks whether data inserted to the model document have image element that has no caption element inside it.
-	 * If there is none - adds it to the image element.
+	 * Checks whether the data inserted to the model document have an image element that has no caption element inside it.
+	 * If there is none, it adds it to the image element.
 	 *
 	 * @private
-	 * @param {module:engine/model/writer~Writer} writer Writer to make changes with.
-	 * @returns {Boolean} `true` if any change has been applied, `false` otherwise.
+	 * @param {module:engine/model/writer~Writer} writer The writer to make changes with.
+	 * @returns {Boolean} `true` if any change was applied, `false` otherwise.
 	 */
 	_insertMissingModelCaptionElement( writer ) {
 		const model = this.editor.model;
@@ -262,12 +262,12 @@ function getParentCaption( node ) {
 	return null;
 }
 
-// Hides given caption in the view if it's empty.
+// Hides a given caption in the view if it is empty.
 //
 // @private
 // @param {module:engine/view/containerelement~ContainerElement} caption
 // @param {module:engine/view/writer~Writer} viewWriter
-// @returns {Boolean} Returns `true` if view was modified.
+// @returns {Boolean} Returns `true` if the view was modified.
 function hideCaptionIfEmpty( caption, viewWriter ) {
 	if ( !caption.childCount && !caption.hasClass( 'ck-hidden' ) ) {
 		viewWriter.addClass( 'ck-hidden', caption );
@@ -277,12 +277,12 @@ function hideCaptionIfEmpty( caption, viewWriter ) {
 	return false;
 }
 
-// Shows the caption
+// Shows the caption.
 //
 // @private
 // @param {module:engine/view/containerelement~ContainerElement} caption
 // @param {module:engine/view/writer~Writer} viewWriter
-// @returns {Boolean} Returns `true` if view was modified.
+// @returns {Boolean} Returns `true` if the view was modified.
 function showCaption( caption, viewWriter ) {
 	if ( caption.hasClass( 'ck-hidden' ) ) {
 		viewWriter.removeClass( 'ck-hidden', caption );

+ 6 - 4
packages/ckeditor5-image/src/imagestyle.js

@@ -17,6 +17,8 @@ import ImageStyleUI from './imagestyle/imagestyleui';
  * It loads the {@link module:image/imagestyle/imagestyleediting~ImageStyleEditing}
  * and {@link module:image/imagestyle/imagestyleui~ImageStyleUI} plugins.
  *
+ * For a detailed overview, check the {@glink features/image#image-styles image styles} documentation.
+ *
  * @extends module:core/plugin~Plugin
  */
 export default class ImageStyle extends Plugin {
@@ -46,7 +48,7 @@ export default class ImageStyle extends Plugin {
  *
  * which configures two default styles:
  *
- *  * the "full" style which doesn't apply any class, e.g. for images styled to span 100% width of the content,
+ *  * the "full" style which does not apply any class, e.g. for images styled to span 100% width of the content,
  *  * the "side" style with the `.image-style-side` CSS class.
  *
  * See {@link module:image/imagestyle/utils~defaultStyles} to learn more about default
@@ -54,7 +56,7 @@ export default class ImageStyle extends Plugin {
  *
  * The {@link module:image/imagestyle/utils~defaultStyles default styles} can be customized,
  * e.g. to change the icon, title or CSS class of the style. The feature also provides several
- * {@link module:image/imagestyle/utils~defaultIcons default icons} to chose from.
+ * {@link module:image/imagestyle/utils~defaultIcons default icons} to choose from.
  *
  *		import customIcon from 'custom-icon.svg';
  *
@@ -71,7 +73,7 @@ export default class ImageStyle extends Plugin {
  *			]
  *		};
  *
- * If none of the default styles is good enough, it is possible to define independent custom styles too:
+ * If none of the default styles is good enough, it is possible to define independent custom styles, too:
  *
  *		import fullSizeIcon from '@ckeditor/ckeditor5-core/theme/icons/object-center.svg';
  *		import sideIcon from '@ckeditor/ckeditor5-core/theme/icons/object-right.svg';
@@ -97,7 +99,7 @@ export default class ImageStyle extends Plugin {
  *
  *		editor.execute( 'imageStyle' { value: 'side' } );
  *
- * The feature creates also buttons which execute the command. So, assuming that you use the
+ * The feature also creates buttons that execute the commands. So, assuming that you use the
  * default image styles setting, you can {@link module:image/image~ImageConfig#toolbar configure the image toolbar}
  * (or any other toolbar) to contain these options:
  *

+ 2 - 2
packages/ckeditor5-image/src/imagestyle/converters.js

@@ -42,7 +42,7 @@ export function modelToViewStyleAttribute( styles ) {
 /**
  * Returns a view-to-model converter converting image CSS classes to a proper value in the model.
  *
- * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles Styles for which the converter is created.
+ * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles The styles for which the converter is created.
  * @returns {Function} A view-to-model converter.
  */
 export function viewToModelStyleAttribute( styles ) {
@@ -73,7 +73,7 @@ export function viewToModelStyleAttribute( styles ) {
 	};
 }
 
-// Returns style with given `name` from array of styles.
+// Returns the style with a given `name` from an array of styles.
 //
 // @param {String} name
 // @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat> } styles

+ 2 - 2
packages/ckeditor5-image/src/imagestyle/imagestylecommand.js

@@ -20,13 +20,13 @@ export default class ImageStyleCommand extends Command {
 	 * Creates an instance of the image style command. Each command instance is handling one style.
 	 *
 	 * @param {module:core/editor/editor~Editor} editor The editor instance.
-	 * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles A styles that this command supports.
+	 * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles The styles that this command supports.
 	 */
 	constructor( editor, styles ) {
 		super( editor );
 
 		/**
-		 * Cached name of the default style if present. If there is no default style it defaults to `false`.
+		 * The cached name of the default style if it is present. If there is no default style, it defaults to `false`.
 		 *
 		 * @type {Boolean|String}
 		 * @private

+ 7 - 7
packages/ckeditor5-image/src/imagestyle/imagestyleediting.js

@@ -67,7 +67,7 @@ export default class ImageStyleEditing extends Plugin {
 }
 
 /**
- * Image style format descriptor.
+ * The image style format descriptor.
  *
  *		import fullSizeIcon from 'path/to/icon.svg';
  *
@@ -82,21 +82,21 @@ export default class ImageStyleEditing extends Plugin {
  *
  * @property {String} name The unique name of the style. It will be used to:
  *
- * * store the chosen style in the model by setting the `imageStyle` attribute of the `<image>` element,
- * * as a value of the {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute `imageStyle` command},
- * * when registering button for each of the styles (`'imageStyle:{name}'`) in the
+ * * Store the chosen style in the model by setting the `imageStyle` attribute of the `<image>` element.
+ * * As a value of the {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute `imageStyle` command},
+ * * when registering a button for each of the styles (`'imageStyle:{name}'`) in the
  * {@link module:ui/componentfactory~ComponentFactory UI components factory} (this functionality is provided by the
- * {@link module:image/imagestyle/imagestyleui~ImageStyleUI} plugin),
+ * {@link module:image/imagestyle/imagestyleui~ImageStyleUI} plugin).
  *
  * @property {Boolean} [isDefault] When set, the style will be used as the default one.
  * A default style does not apply any CSS class to the view element.
  *
  * @property {String} icon One of the following to be used when creating the style's button:
  *
- * * An SVG icon source (as an XML string),
+ * * An SVG icon source (as an XML string).
  * * One of {@link module:image/imagestyle/utils~defaultIcons} to use a default icon provided by the plugin.
  *
  * @property {String} title The style's title.
  *
- * @property {String} className The CSS class used to represent the style in view.
+ * @property {String} className The CSS class used to represent the style in the view.
  */

+ 1 - 1
packages/ckeditor5-image/src/imagestyle/imagestyleui.js

@@ -92,7 +92,7 @@ export default class ImageStyleUI extends Plugin {
 }
 
 /**
- * Returns translated `title` from the passed styles array.
+ * Returns the translated `title` from the passed styles array.
  *
  * @param {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>} styles
  * @param titles

+ 12 - 12
packages/ckeditor5-image/src/imagestyle/utils.js

@@ -15,24 +15,24 @@ import centerIcon from '@ckeditor/ckeditor5-core/theme/icons/object-center.svg';
 import rightIcon from '@ckeditor/ckeditor5-core/theme/icons/object-right.svg';
 
 /**
- * Default image styles provided by the plugin, which can be referred in the
- * {@link module:image/image~ImageConfig#styles} config.
+ * Default image styles provided by the plugin that can be referred in the
+ * {@link module:image/image~ImageConfig#styles} configuration.
  *
  * Among them, 2 default semantic content styles are available:
  *
  * * `full` is a full–width image without any CSS class,
- * * `side` is a side image styled with the `image-style-side` CSS class
+ * * `side` is a side image styled with the `image-style-side` CSS class.
  *
  * There are also 3 styles focused on formatting:
  *
  * * `alignLeft` aligns the image to the left using the `image-style-align-left` class,
- * * `alignCenter` centers the image to the left using the `image-style-align-center` class,
+ * * `alignCenter` centers the image using the `image-style-align-center` class,
  * * `alignRight` aligns the image to the right using the `image-style-align-right` class,
  *
  * @member {Object.<String,Object>}
  */
 const defaultStyles = {
-	// This option is equal to situation when no style is applied.
+	// This option is equal to the situation when no style is applied.
 	full: {
 		name: 'full',
 		title: 'Full size image',
@@ -40,7 +40,7 @@ const defaultStyles = {
 		isDefault: true
 	},
 
-	// This represents side image.
+	// This represents a side image.
 	side: {
 		name: 'side',
 		title: 'Side image',
@@ -48,7 +48,7 @@ const defaultStyles = {
 		className: 'image-style-side'
 	},
 
-	// This style represents an imaged aligned to the left.
+	// This style represents an image aligned to the left.
 	alignLeft: {
 		name: 'alignLeft',
 		title: 'Left aligned image',
@@ -56,7 +56,7 @@ const defaultStyles = {
 		className: 'image-style-align-left'
 	},
 
-	// This style represents a centered imaged.
+	// This style represents a centered image.
 	alignCenter: {
 		name: 'alignCenter',
 		title: 'Centered image',
@@ -64,7 +64,7 @@ const defaultStyles = {
 		className: 'image-style-align-center'
 	},
 
-	// This style represents an imaged aligned to the right.
+	// This style represents an image aligned to the right.
 	alignRight: {
 		name: 'alignRight',
 		title: 'Right aligned image',
@@ -74,8 +74,8 @@ const defaultStyles = {
 };
 
 /**
- * Default image style icons provided by the plugin, which can be referred in the
- * {@link module:image/image~ImageConfig#styles} config.
+ * Default image style icons provided by the plugin that can be referred in the
+ * {@link module:image/image~ImageConfig#styles} configuration.
  *
  * There are 4 icons available: `'full'`, `'left'`, `'center'` and `'right'`.
  *
@@ -89,7 +89,7 @@ const defaultIcons = {
 };
 
 /**
- * Returns {@link module:image/image~ImageConfig#styles} array with items normalized in the
+ * Returns a {@link module:image/image~ImageConfig#styles} array with items normalized in the
  * {@link module:image/imagestyle/imagestyleediting~ImageStyleFormat} format and a complete `icon` markup for each style.
  *
  * @returns {Array.<module:image/imagestyle/imagestyleediting~ImageStyleFormat>}

+ 1 - 1
packages/ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.js

@@ -11,7 +11,7 @@ import Command from '@ckeditor/ckeditor5-core/src/command';
 import { isImage } from '../image/utils';
 
 /**
- * The image text alternative command. It is used to change the `alt` attribute on `<image>` elements.
+ * The image text alternative command. It is used to change the `alt` attribute of `<image>` elements.
  *
  * @extends module:core/command~Command
  */

+ 1 - 2
packages/ckeditor5-image/src/imagetextalternative/imagetextalternativeui.js

@@ -182,8 +182,7 @@ export default class ImageTextAlternativeUI extends Plugin {
 	}
 
 	/**
-	 * Returns `true` when the {@link #_form} is the visible view
-	 * in the {@link #_balloon}.
+	 * Returns `true` when the {@link #_form} is the visible view in the {@link #_balloon}.
 	 *
 	 * @private
 	 * @type {Boolean}

+ 1 - 1
packages/ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.js

@@ -38,7 +38,7 @@ export default class TextAlternativeFormView extends View {
 		const t = this.locale.t;
 
 		/**
-		 * Tracks information about DOM focus in the form.
+		 * Tracks information about the DOM focus in the form.
 		 *
 		 * @readonly
 		 * @member {module:utils/focustracker~FocusTracker}

+ 10 - 11
packages/ckeditor5-image/src/imagetoolbar.js

@@ -23,6 +23,8 @@ const balloonClassName = 'ck-toolbar-container';
  *
  * The toolbar uses the {@link module:ui/panel/balloon/contextualballoon~ContextualBalloon}.
  *
+ * For a detailed overview, check the {@glink features/image#image-contextual-toolbar image contextual toolbar} documentation.
+ *
  * @extends module:core/plugin~Plugin
  */
 export default class ImageToolbar extends Plugin {
@@ -47,7 +49,7 @@ export default class ImageToolbar extends Plugin {
 		const editor = this.editor;
 		const balloonToolbar = editor.plugins.get( 'BalloonToolbar' );
 
-		// If `BalloonToolbar` plugin is loaded, it should be disabled for images
+		// If the `BalloonToolbar` plugin is loaded, it should be disabled for images
 		// which have their own toolbar to avoid duplication.
 		// https://github.com/ckeditor/ckeditor5-image/issues/110
 		if ( balloonToolbar ) {
@@ -72,7 +74,7 @@ export default class ImageToolbar extends Plugin {
 		}
 
 		/**
-		 * The contextual balloon plugin instance.
+		 * A contextual balloon plugin instance.
 		 *
 		 * @private
 		 * @member {module:ui/panel/balloon/contextualballoon~ContextualBalloon}
@@ -80,8 +82,7 @@ export default class ImageToolbar extends Plugin {
 		this._balloon = this.editor.plugins.get( 'ContextualBalloon' );
 
 		/**
-		 * A `ToolbarView` instance used to display the buttons specific for image
-		 * editing.
+		 * A `ToolbarView` instance used to display the buttons specific for image editing.
 		 *
 		 * @protected
 		 * @type {module:ui/toolbar/toolbarview~ToolbarView}
@@ -103,8 +104,7 @@ export default class ImageToolbar extends Plugin {
 	}
 
 	/**
-	 * Checks whether the toolbar should show up or hide depending on the
-	 * current selection.
+	 * Checks whether the toolbar should show up or hide depending on the current selection.
 	 *
 	 * @private
 	 */
@@ -157,8 +157,7 @@ export default class ImageToolbar extends Plugin {
 	}
 
 	/**
-	 * Returns `true` when the {@link #_toolbar} is the visible view
-	 * in the {@link #_balloon}.
+	 * Returns `true` when the {@link #_toolbar} is the visible view in the {@link #_balloon}.
 	 *
 	 * @private
 	 * @type {Boolean}
@@ -170,14 +169,14 @@ export default class ImageToolbar extends Plugin {
 
 /**
  * Items to be placed in the image toolbar.
- * The option is used by the {@link module:image/imagetoolbar~ImageToolbar} feature.
+ * This option is used by the {@link module:image/imagetoolbar~ImageToolbar} feature.
  *
  * Assuming that you use the following features:
  *
  * * {@link module:image/imagestyle~ImageStyle} (with a default configuration),
- * * {@link module:image/imagetextalternative~ImageTextAlternative}.
+ * * {@link module:image/imagetextalternative~ImageTextAlternative},
  *
- * Three toolbar items will be available in {@link module:ui/componentfactory~ComponentFactory}:
+ * three toolbar items will be available in {@link module:ui/componentfactory~ComponentFactory}:
  * `'imageStyle:full'`, `'imageStyle:side'`, and `'imageTextAlternative'` so you can configure the toolbar like this:
  *
  *		const imageConfig = {

+ 4 - 2
packages/ckeditor5-image/src/imageupload.js

@@ -13,13 +13,15 @@ import ImageUploadProgress from './imageupload/imageuploadprogress';
 import ImageUploadEditing from './imageupload/imageuploadediting';
 
 /**
- * Image upload plugin.
+ * The image upload plugin.
  *
- * This plugin do not do anything directly, but loads set of specific plugins to enable image uploading:
+ * This plugin does not do anything directly, but it loads a set of specific plugins to enable image uploading:
  * * {@link module:image/imageupload/imageuploadediting~ImageUploadEditing},
  * * {@link module:image/imageupload/imageuploadui~ImageUploadUI},
  * * {@link module:image/imageupload/imageuploadprogress~ImageUploadProgress}.
  *
+ * For a detailed overview, check the {@glink features/image-upload image upload feature} documentation.
+ *
  * @extends module:core/plugin~Plugin
  */
 export default class ImageUpload extends Plugin {

+ 5 - 5
packages/ckeditor5-image/src/imageupload/imageuploadcommand.js

@@ -23,12 +23,12 @@ export default class ImageUploadCommand extends Command {
 	 * Executes the command.
 	 *
 	 * @fires execute
-	 * @param {Object} options Options for executed command.
-	 * @param {File} options.file Image file to upload.
-	 * @param {module:engine/model/position~Position} [options.insertAt] Position at which the image should be inserted.
-	 * If the position is not specified the image will be inserted into the current selection.
+	 * @param {Object} options Options for the executed command.
+	 * @param {File} options.file The image file to upload.
+	 * @param {module:engine/model/position~Position} [options.insertAt] The position at which the image should be inserted.
+	 * If the position is not specified, the image will be inserted into the current selection.
 	 * Note: You can use the {@link module:upload/utils~findOptimalInsertionPosition} function to calculate
-	 * (e.g. based on the current selection) a position which is more optimal from UX perspective.
+	 * (e.g. based on the current selection) a position which is more optimal from the UX perspective.
 	 */
 	execute( options ) {
 		const editor = this.editor;

+ 3 - 3
packages/ckeditor5-image/src/imageupload/imageuploadediting.js

@@ -110,8 +110,8 @@ export default class ImageUploadEditing extends Plugin {
 	}
 
 	/**
-	 * Performs image loading. Image is read from the disk and temporary data is displayed, after uploading process
-	 * is complete we replace temporary data with target image from the server.
+	 * Performs image loading. The image is read from the disk and temporary data is displayed. When the upload process
+	 * is complete the temporary data is replaced with the target image from the server.
 	 *
 	 * @private
 	 * @param {module:upload/filerepository~FileLoader} loader
@@ -213,7 +213,7 @@ export default class ImageUploadEditing extends Plugin {
 	}
 }
 
-// Returns true if non-empty `text/html` is included in data transfer.
+// Returns `true` if non-empty `text/html` is included in the data transfer.
 //
 // @param {module:clipboard/datatransfer~DataTransfer} dataTransfer
 // @returns {Boolean}

+ 5 - 5
packages/ckeditor5-image/src/imageupload/imageuploadprogress.js

@@ -16,8 +16,8 @@ import ViewRange from '@ckeditor/ckeditor5-engine/src/view/range';
 import '../../theme/imageuploadprogress.css';
 
 /**
- * Image upload progress plugin.
- * Shows placeholder when image is read from disk and progress bar while image is uploading.
+ * The image upload progress plugin.
+ * It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.
  *
  * @extends module:core/plugin~Plugin
  */
@@ -29,7 +29,7 @@ export default class ImageUploadProgress extends Plugin {
 		super( editor );
 
 		/**
-		 * Image's placeholder that is displayed before real image data can be accessed.
+		 * The image placeholder that is displayed before real image data can be accessed.
 		 *
 		 * @protected
 		 * @member {String} #placeholder
@@ -48,9 +48,9 @@ export default class ImageUploadProgress extends Plugin {
 	}
 
 	/**
-	 * This ethod is called each time image's `uploadStatus` attribute is changed.
+	 * This method is called each time the image `uploadStatus` attribute is changed.
 	 *
-	 * @param {module:utils/eventinfo~EventInfo} evt Object containing information about the fired event.
+	 * @param {module:utils/eventinfo~EventInfo} evt An object containing information about the fired event.
 	 * @param {Object} data Additional information about the change.
 	 * @param {module:engine/conversion/modelconsumable~ModelConsumable} consumable Values to consume.
 	 * @param {Object} conversionApi

+ 2 - 2
packages/ckeditor5-image/src/imageupload/imageuploadui.js

@@ -13,8 +13,8 @@ import imageIcon from '@ckeditor/ckeditor5-core/theme/icons/image.svg';
 import { isImageType, findOptimalInsertionPosition } from './utils';
 
 /**
- * Image upload button plugin.
- * Adds `imageUpload` button to UI component factory.
+ * The image upload button plugin.
+ * Adds the `imageUpload` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}.
  *
  * @extends module:core/plugin~Plugin
  */

+ 8 - 8
packages/ckeditor5-image/src/imageupload/utils.js

@@ -10,7 +10,7 @@
 import ModelPosition from '@ckeditor/ckeditor5-engine/src/model/position';
 
 /**
- * Checks if given file is an image.
+ * Checks if a given file is an image.
  *
  * @param {File} file
  * @returns {Boolean}
@@ -24,16 +24,16 @@ export function isImageType( file ) {
 /**
  * Returns a model position which is optimal (in terms of UX) for inserting an image.
  *
- * For instance, if a selection is in a middle of a paragraph, position before this paragraph
- * will be returned, so that it's not split. If the selection is at the end of a paragraph,
- * position after this paragraph will be returned.
+ * For instance, if a selection is in the middle of a paragraph, the position before this paragraph
+ * will be returned so that it is not split. If the selection is at the end of a paragraph,
+ * the position after this paragraph will be returned.
  *
- * Note: If selection is placed in an empty block, that block will be returned. If that position
- * is then passed to {@link module:engine/model/model~Model#insertContent}
- * that block will be fully replaced by the image.
+ * Note: If the selection is placed in an empty block, that block will be returned. If that position
+ * is then passed to {@link module:engine/model/model~Model#insertContent},
+ * the block will be fully replaced by the image.
  *
  * @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection} selection
- * Selection based on which the insertion position should be calculated.
+ * The selection based on which the insertion position should be calculated.
  * @returns {module:engine/model/position~Position} The optimal position.
  */
 export function findOptimalInsertionPosition( selection ) {

+ 1 - 1
packages/ckeditor5-image/theme/image.css

@@ -11,7 +11,7 @@
 		/* Prevent unnecessary margins caused by line-height (see #44). */
 		display: block;
 
-		/* Center the image if its width is smaller than content's width. */
+		/* Center the image if its width is smaller than the content's width. */
 		margin: 0 auto;
 
 		/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */

+ 1 - 1
packages/ckeditor5-image/theme/imageuploadprogress.css

@@ -12,7 +12,7 @@ figure.image {
 	position: relative;
 	overflow: hidden;
 
-	/* Infinite progress bar on top while image is read. */
+	/* Infinite progress bar on top while the image is read. */
 	&.ck-infinite-progress::before {
 		content: "";
 		position: absolute;