Bläddra i källkod

Docs: Image upload via URL guide section and API docs corrected. [skip ci]

Anna Tomanek 5 år sedan
förälder
incheckning
b1085b2d50

+ 3 - 3
packages/ckeditor5-image/docs/features/image.md

@@ -84,9 +84,9 @@ See the {@link features/image-upload Image upload} guide.
 
 ## Inserting images via source URL
 
-Besides the ability to insert images by uploading them directly from your disk or via CKFinder, you can also configure the editor to allow inserting images via source URL.
+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 configure `image.upload.panel.items` like below:
+In order to enable this option, configure {@link module:image/imageupload~ImageUploadPanelConfig#items `image.upload.panel.items`} like below:
 
 ```js
 ClassicEditor
@@ -103,7 +103,7 @@ ClassicEditor
 	} )
 ```
 
-This will extend the standalone **Insert image** button in the toolbar by adding the dropdown panel with the new feature (click the arrow next to the button). To see how it works, please take a look at the demo below:
+This will extend the standalone **Insert image** button in the toolbar by adding a dropdown panel with the new feature. To open the panel and add the image URL, click the arrow next to the image button. Check the demo below to insert a new image via URL or update an existing image by selecting it, opening the dropdown panel and pasting a new URL.
 
 {@snippet features/image-insert-via-url}
 

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

@@ -42,7 +42,7 @@ export default class ImageUpload extends Plugin {
 }
 
 /**
- * Image upload configuration.
+ * The image upload configuration.
  *
  * @member {module:image/imageupload~ImageUploadConfig} module:image/image~ImageConfig#upload
  */
@@ -75,7 +75,7 @@ export default class ImageUpload extends Plugin {
  *		};
  *
  * The type string should match [one of the sub-types](https://www.iana.org/assignments/media-types/media-types.xhtml#image)
- * of the image MIME type. E.g. for the `image/jpeg` MIME type, add `'jpeg'` to your image upload configuration.
+ * of the image MIME type. For example, for the `image/jpeg` MIME type, add `'jpeg'` to your image upload configuration.
  *
  * **Note:** This setting only restricts some image types to be selected and uploaded through the CKEditor UI and commands. Image type
  * recognition and filtering should also be implemented on the server which accepts image uploads.
@@ -85,7 +85,7 @@ export default class ImageUpload extends Plugin {
  */
 
 /**
- * Image upload panel view configuration.
+ * The image upload panel view configuration.
  *
  * @protected
  * @member {module:image/imageupload~ImageUploadPanelConfig} module:image/imageupload~ImageUploadConfig#panel
@@ -98,7 +98,7 @@ export default class ImageUpload extends Plugin {
  *			.create( editorElement, {
  * 				image: {
  * 					upload: {
- * 						panel: ... // panel settings goes here
+ * 						panel: ... // Panel settings go here.
  * 					}
  * 				}
  *			} )
@@ -114,12 +114,13 @@ export default class ImageUpload extends Plugin {
 /**
  * The list of {@link module:image/imageupload~ImageUpload} integrations.
  *
- * The option accepts string tokens.
- * * for predefined integrations, we have two special strings: `insertImageViaUrl` and `openCKFinder`.
- * The former adds **Insert image via URL** feature, while the latter adds built-in **CKFinder** integration.
- * * for custom integrations, each string should be a name of the already registered component.
- * If you have a plugin `PluginX` that registers `pluginXButton` component, then the integration token
- * in that case should be `pluginXButton`.
+ * This option accepts string tokens:
+ * * For predefined integrations, there are two special strings: `insertImageViaUrl` and `openCKFinder`.
+ * The former adds the {@glink features/image#inserting-images-via-source-url Insert image via URL} feature, while the latter adds the
+ * built-in {@glink features/image-upload/ckfinder CKFinder} integration.
+ * * For custom integrations, each string should be a name of the already registered component.
+ * If you have a plugin `PluginX` that registers the `pluginXButton` component, then in that case the integration token
+ * should be `pluginXButton`.
  *
  *		// Add `insertImageViaUrl`, `openCKFinder` and custom `pluginXButton` integrations.
  *		const imageUploadConfig = {