Skip to content

Commit ed5a6b1

Browse files
committed
MAGEDOC-3432: Clarify image uploader topic
Updated per fisheye review
1 parent 1997fa7 commit ed5a6b1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

docs/how-to/how-to-use-image-uploader.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# How to add an image uploader
22

3-
This topic describes how to add the image uploader component to your content type so that end-users can add images to a page.
3+
This topic describes how to add the image uploader component to your content type so that end-users can add images from the Admin stage as needed.
44

55
![How to add an image uploader](../images/how-to-add-image-uploader.svg)
66

77
## Step 1: Add configuration data for the uploader
88

9-
The first step is to customize the image uploader to suit your needs. To do this, you must add the `additional_data` element to your content type's config file, then use the `item` elements to create the data types and values to initialize the image uploader to meet your specific needs.
9+
The first step is to customize the image uploader to suit your needs. To do this, you must add the `additional_data` element to your content type's config file to create the data types and values needed to initialize the image uploader for your specific needs.
1010

1111
``` xml
1212
<?xml version="1.0"?>
@@ -43,14 +43,6 @@ The first step is to customize the image uploader to suit your needs. To do this
4343
</config>
4444
```
4545

46-
The Page Builder image uploader provides a wrapper around the Magento [ImageUploader component](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/image-uploader/), which extends the Magento [FileUploader component](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-fileuploader.html). The documentation at those links describes most of the configuration properties. You can find the other properties (shown in the `additional_data` entries above) within these source files:
47-
- `magento2-page-builder/app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/image-uploader.js`
48-
- `magento2-page-builder/app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/uploader.ts`
49-
50-
51-
**[Are these all the settings? Which of these settings is required?]**
52-
53-
5446
## Step 2: Create an instance of the uploader
5547

5648
To create an instance of the image uploader in your preview component (`preview.js`), import the `Magento_PageBuilder/js/content-type/uploader` component as a dependency and call the uploader constructor, passing in your content type's configuration options (added in step 1) and the other required arguments, as shown here :

0 commit comments

Comments
 (0)