Skip to content

Commit a7ebb3f

Browse files
committed
MAGEDOC-3440: Edit events topic
Minor organizing
1 parent daebffb commit a7ebb3f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/reference/events.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Page Builder events
22

3+
## Event consumption
34
The pattern for consuming Page Builder events in JavaScript, such as within the `preview.js` component, is to import `Magento_PageBuilder/js/events` and use the `events.on()` method to bind to the event you want to handle, as shown here:
45

56
```js
@@ -15,9 +16,9 @@ define([
1516

1617
```
1718

18-
## Events
19+
## Events list
1920

20-
The following table lists the Page Builder events you can consume.
21+
The following table lists the Page Builder events you can bind to and handle within your content type.
2122

2223
<!-- {% raw %} -->
2324

@@ -45,7 +46,7 @@ The following table lists the Page Builder events you can consume.
4546
| [image:uploadAfter](#imageuploadafter) | [{{config.name}}:{{preview.parent.id}}:updateAfter](#confignameidupdateafter) |
4647
| | |
4748

48-
## Usage
49+
## Event details
4950

5051
## `contentType:*` events
5152
Events starting with `contentType:` are triggered for every content type on the stage. These events can also be called for specific content types by prefixing the content type's name before the event (`name:event`). For example:
@@ -559,6 +560,6 @@ events.on("googleMaps:authFailure", function () {});
559560

560561

561562

562-
[Back to top]: #events
563+
[Back to top]: #events-list
563564

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

0 commit comments

Comments
 (0)