Skip to content

Commit 26b8de5

Browse files
committed
MAGEDOC-3448: Add docs for content type styles
Incorporated more review comments
1 parent bc862cb commit 26b8de5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The name of your configuration file should reflect the name of your content type
1515
![Create config file](../images/step1-add-config-file.png)
1616

1717
{: .bs-callout .bs-callout-info }
18-
The reason we suggest prefIxing your content type with your vendor name is to prevent Magento from merging your content type configuration file with another configuration file of the same name, or with a future content type published by Magento.
18+
The reason we suggest prefixing your content type with your vendor name is to prevent Magento from merging your content type configuration file with another configuration file of the same name, or with a future content type published by Magento.
1919

2020
## The `example_quote` configuration
2121

@@ -31,7 +31,7 @@ The following configuration is from the Quote content type. An overview of these
3131
label="Quote"
3232
group="elements"
3333
component="Magento_PageBuilder/js/content-type"
34-
preview_component="Magento_PageBuilder/js/content-type/preview"
34+
preview_component="Example_PageBuilderQuote/js/content-type/example-quote/preview"
3535
master_component="Magento_PageBuilder/js/content-type/master"
3636
form="pagebuilder_example_quote_form"
3737
icon="icon-pagebuilder-heading"

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ The Quote form is shown in full here for you to copy into your `pagebuilder_exam
160160

161161
### fieldset
162162

163-
Page Builder requires fields to be grouped within named `<fieldset>`s. Fieldsets provide your fields with a basic grouping mechanism and an optional label. You can define as many fieldsets as you want.
163+
Page Builder requires fields to be grouped within named `<fieldset>` elements. Fieldsets provide your fields with a basic grouping mechanism and an optional label. You can define as many fieldsets as you want.
164164

165165
| Attribute | Description |
166166
| ----------- | ------------------------------------------------------------ |
@@ -271,7 +271,7 @@ The `<element>` element provides a scope for the data bindings within it.
271271

272272
| Attribute | Description |
273273
| --------- | ------------------------------------------------------------ |
274-
| `name` | Specifies the name of the element's scope for data binding when applied to template elements. In our example, we use the element name of `main` as the scope for binding styles and other attributes to the top-level `<div>` element in our template: `<div attr="data.main.attributes" ko-style="data.main.style">` |
274+
| `name` | Specifies the name of the element scope for the data binding when applied to template elements. In our example, the element name of `main` is used as the scope for binding styles and other attributes to the top-level `<div>` element in our template: `<div attr="data.main.attributes" ko-style="data.main.style">` |
275275

276276
#### style
277277

@@ -281,19 +281,19 @@ The `<style>` element configures the bindings from the form style fields to the
281281
| ------------------- | ------------------------------------------------------------ |
282282
| `name` | By convention, the name of the element should match the source. |
283283
| `source` | The name of the form field you want the style bound to. |
284-
| `converter` | [Please add description/purpose] |
285-
| `preview_converter` | [Please add description/purpose] |
286-
| `storage_key` | [Please add description/purpose] |
287-
| `reader` | [Please add description/purpose] |
284+
| `converter` | Converts the value after reading or before saving to the DOM. |
285+
| `preview_converter` | Converts the value for the preview. Used for cases where the conversion logic is different between the two views. |
286+
| `storage_key` | Optional variable name for value in the data storage. If no value is provided, the `name` attribute will be used. |
287+
| `reader` | Reader used for parsing attributes and properties out of the DOM. Should not be used with read-only persistence_mode. |
288288

289289
#### attribute
290290

291-
The `<attribute>` element provides... [Please describe the purpose of this element.]
291+
The `<attribute>` element provides a mechanism to attach DOM attributes to template elements.
292292

293293
| Attribute | Description |
294294
| --------- | ------------------------------------------------------------ |
295-
| `name` | [Please add description/purpose as it applies to the code example above] |
296-
| `source` | [Please add description/purpose as it applies to the code example above] |
295+
| `name` | Unique name used for configuration merging, and the default value for storage_key if none is provided. |
296+
| `source` | The name of the property or attribute in the DOM. Must be in snake_case. |
297297

298298
#### css
299299

0 commit comments

Comments
 (0)