Skip to content

Commit 5cd2704

Browse files
committed
MC-5710: Beta docs tutorial
Changed add editor to add form in step 4 of tutorial, graphics included.
1 parent 47561fa commit 5cd2704

File tree

10 files changed

+15
-21
lines changed

10 files changed

+15
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ https://devdocs.magedevteam.com/ds_pagebuilder/page-builder/getting-started/intr
2424
* [Step 1: Add configuration](docs/create-basic-content-type/step-1-add-configuration.md)
2525
* [Step 2: Add templates](docs/create-basic-content-type/step-2-add-templates.md)
2626
* [Step 3: Add components](docs/create-basic-content-type/step-3-add-components.md)
27-
* [Step 4: Add editor](docs/create-basic-content-type/step-4-add-editor.md)
27+
* [Step 4: Add editor](docs/create-basic-content-type/step-4-add-form.md)
2828
* [Step 5: Add styles](docs/create-basic-content-type/step-5-add-styles.md)
2929
* [Step 6: Add frontend widget](docs/create-basic-content-type/step-6-add-frontend-widget.md)
3030
* [What's next](docs/create-basic-content-type/whats-next.md)

docs/create-basic-content-type/step-1-add-configuration.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The configuration file gives your content type its existence. It's where you set
1111

1212
The file name should reflect the name of your content type. Use underscores to separate multi-word names as needed.
1313

14-
## Example
14+
## Example configuration
1515

1616
{: .bs-callout .bs-callout-info }
1717
Only a subset of configuration elements are described in this example (enough to understand the configuration file's role within a content type). For more details, refer to [Main configurations](../configurations/content-type-configuration.md) and [Additional configurations](../configurations/additional-configurations.md).
@@ -51,7 +51,6 @@ The following configuration shows the minimal requirements for defining a conten
5151
<style name="padding" storage_key="margins_and_padding" reader="Magento_PageBuilder/js/property/paddings" converter="Magento_PageBuilder/js/converter/style/paddings"/>
5252
<attribute name="name" source="data-role"/>
5353
<attribute name="appearance" source="data-appearance"/>
54-
<tag name="example_type"/>
5554
<html name="example_text" converter="Magento_PageBuilder/js/converter/html/tag-escaper"/>
5655
<css name="css_classes"/>
5756
</element>
@@ -74,7 +73,7 @@ The `<type>` node defines the key properties of your content type. The attribute
7473
| component | Currently there are two component types to choose from: `content-type` and `content-type-collection`. Use `Magento_PageBuilder/js/content-type` for static content types that do not have children. Use `Magento_PageBuilder/js/content-type-collection` for content types that can contain children, otherwise known as container content types. |
7574
| preview_component | JavaScript file that provides preview-specific rendering logic within the Admin UI. |
7675
| master_component | JavaScript file that provides master format rendering logic generic for all appearances of your content type when rendered on the storefront. |
77-
| form | UI component form that provides the editor for your content type. |
76+
| form | UI component form that provides the form controls for editing your content type. |
7877
| icon | Optional. PNG or SVG image displayed in the Page Builder panel alongside the label. |
7978
| is_hideable | Optional. Default `true`. Include it only when you want to set it to `false` to prevent the end-user from hiding your content type on demand, using a button (eye icon) in the options menu. A setting of false will remove the hide button from the options menu. |
8079
| translate | Identifies the attribute you want Magento to translate. Here, the `label` value is set for translation. |
@@ -99,7 +98,7 @@ All content types must have at least one `<appearance>` defined within the `<app
9998

10099
## The `elements` node
101100

102-
The purpose of `<elements>` node in the configuration is to map the data from the editor to the content type's master format so that the values entered in the editor can be stored and rendered correctly within both the Admin preview and the storefront. These nodes will be explained more fully in Step 4: Add editor.
101+
The purpose of `<elements>` node in the configuration is to map the data from the form to the content type's master format so that the values entered in the editor can be stored and rendered correctly within both the Admin preview and the storefront. These nodes will be explained more fully in Step 4: Add editor.
103102

104103
## Next
105104

docs/create-basic-content-type/step-2-add-templates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Templates are the HTML files that define the appearance of content types within
99

1010
## Configuration
1111

12-
Templates are referenced from the `<appearance>` element of the configuration file as shown here:
12+
In your configuration file, reference your templates as shown here within the `<appearance>` element:
1313

1414
```xml
1515
<appearance name="default"

docs/create-basic-content-type/step-3-add-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Components are the JavaScript files that define the behaviors of your content ty
99

1010
## Configuration
1111

12-
Components are referenced from the `<type>` element of the configuration file as shown here:
12+
In your configuration file, reference your JavaScript component (`preview.js`) as shown here within the `<type>` element:
1313

1414
```XML
1515
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

docs/create-basic-content-type/step-4-add-editor.md renamed to docs/create-basic-content-type/step-4-add-form.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# Step 4: Add editor
1+
# Step 4: Add form
22

33
{: .bs-callout .bs-callout-info }
44
The development of this tutorial is currently **IN PROGRESS**.
55

6-
Page Builder provides an editor that slides out from the right of the screen within the Admin UI to give users a way to add content and customize the appearance of your content type, as shown in the screen shot. All you have to do is create a UI component form and a layout for the editor to use.
6+
Page Builder provides an editor that slides out from the right of the screen within the Admin UI to give you a way to add content and customize the appearance of your content type, as shown in the screen shot. To use and customize this editor for your needs, you need to create a UI component form along with the layout to display that form.
77

88
![Create config file](../images/content-type-editor.png)
99

1010
## Configuration
1111

12-
Reference your UI component form as shown here in the `<type>` element of your configuration file:
12+
In your configuration file, reference your UI component form as shown here within the `<type>` element:
1313

1414
```xml
1515
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1616
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_PageBuilder:etc/content_type.xsd">
1717
<type name="example"
1818
label="Example"
1919
form="pagebuilder_example_form"
20+
...
2021
```
2122

2223
| Attribute | Description |
2324
| --------- | ------------------------------------------------------------ |
2425
| form | `pagebuilder_example_form.xml` - UI component form that provides the editor for your content type. |
25-
2626
{:style="table-layout:auto"}
2727

2828
## Location
@@ -32,13 +32,11 @@ Add the layout and form to your module as shown here:
3232
- `view/adminhtml/web/layout/`
3333
- `view/adminhtml/web/ui-component/`
3434

35-
![Create config file](../images/step4-add-editor.png)
36-
37-
35+
![Create config file](../images/step4-add-form.png)
3836

3937
## Create UI component form
4038

41-
In this example, we create a form that extends `pagebuilder_base_form` to provide a basic form editor for our content type. The code is provided here followed by descriptions of the key parts.
39+
In this example, let's create a form that extends `pagebuilder_base_form` to provide form controls for editing our content type. The code is provided here followed by descriptions of the key parts.
4240
4341
```xml
4442
<?xml version="1.0" encoding="UTF-8"?>
@@ -181,7 +179,7 @@ In this example, we create a form that extends `pagebuilder_base_form` to provid
181179
182180
```
183181
184-
182+
[Insert descriptions]
185183
186184
## Create layout
187185

docs/create-basic-content-type/step-5-add-styles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ Add your LESS files here:
3535

3636
## Create LESS files
3737

38-
In this example,
38+
In this example...
3939

4040
<!-- {% endraw %} -->

docs/create-basic-content-type/step-6-add-frontend-widget.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ The frontend widget is a JavaScript file that controls the UI behavior (user int
1010
## Configuration
1111

1212

13-
14-
15-
1613
## Location
1714

1815
Add it to your module in the following location (`view/base/web/js/content-type/example/appearance/default/`):

docs/getting-started/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ See [Install Page Builder](install-pagebuilder.md)
2626
* [Step 1: Add configuration](../create-basic-content-type/step-1-add-configuration.md)
2727
* [Step 2: Add templates](../create-basic-content-type/step-2-add-templates.md)
2828
* [Step 3: Add components](../create-basic-content-type/step-3-add-components.md)
29-
* [Step 4: Add editor](../create-basic-content-type/step-4-add-editor.md)
29+
* [Step 4: Add editor](../create-basic-content-type/step-4-add-form.md)
3030
* [Step 5: Add styles](../create-basic-content-type/step-5-add-styles.md)
3131
* [Step 6: Add frontend widget](../create-basic-content-type/step-6-add-frontend-widget.md)
3232
* [What's next](../create-basic-content-type/whats-next.md)

docs/images/content-type-overview.png

-111 Bytes
Loading

docs/images/step4-add-form.png

18.5 KB
Loading

0 commit comments

Comments
 (0)