Skip to content

Commit 8e089fd

Browse files
committed
MAGEDOC-3440: Edit events topic
Changed event examples to account for breaking changes
1 parent c327249 commit 8e089fd

File tree

1 file changed

+27
-60
lines changed

1 file changed

+27
-60
lines changed

docs/reference/events.md

Lines changed: 27 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ The following table lists the Page Builder events you can bind to and handle wit
2929
| [contentType:duplicateAfter](#contenttypeduplicateafter) | [stage:interactionStart](#stageinteractionstart) |
3030
| [contentType:mountAfter](#contenttypemountafter) | [stage:interactionStop](#stageinteractionstop) |
3131
| [contentType:moveAfter](#contenttypemoveafter) | [stage:error](#stageerror) |
32-
| [contentType:moveBefore](#contenttypemovebefore) | [stage:{{preview.parent.stageId}}:masterFormatRenderAfter](#stageidmasterformatrenderafter) |
33-
| [contentType:redrawAfter](#contenttyperedrawafter) | [stage:{{preview.parent.stageId}}:readyAfter](#stageidreadyafter) |
34-
| [contentType:removeAfter](#contenttyperemoveafter) | [stage:{{preview.parent.stageId}}:renderAfter](#stagepreviewparentstageidrenderafter) |
35-
| [contentType:renderAfter](#contenttyperenderafter) | [stage:{{preview.parent.stageId}}:toggleFullscreen](#stageidtogglefullscreen) |
32+
| [contentType:moveBefore](#contenttypemovebefore) | [stage:{{preview.contentType.stageId}}:masterFormatRenderAfter](#stageidmasterformatrenderafter) |
33+
| [contentType:redrawAfter](#contenttyperedrawafter) | [stage:{{preview.contentType.stageId}}:readyAfter](#stageidreadyafter) |
34+
| [contentType:removeAfter](#contenttyperemoveafter) | [stage:{{preview.contentType.stageId}}:renderAfter](#stagepreviewcontenttypestageidrenderafter) |
35+
| [contentType:renderAfter](#contenttyperenderafter) | [stage:{{preview.contentType.stageId}}:toggleFullscreen](#stageidtogglefullscreen) |
3636
| | [stage:updateAfter](#stageupdateafter) |
3737
| | |
3838
| **Column Events** | **Preview Events** |
@@ -41,9 +41,9 @@ The following table lists the Page Builder events you can bind to and handle wit
4141
| [column:initializeAfter](#columninitializeafter) | [previewData:updateAfter](#previewdataupdateafter) |
4242
| | |
4343
| **Image Events** | **Other Events** |
44-
| [image:{{preview.parent.id}}:assignAfter](#imageidassignafter) | [googleMaps:authFailure](#googlemapsauthfailure) |
44+
| [image:{{preview.contentType.id}}:assignAfter](#imageidassignafter) | [googleMaps:authFailure](#googlemapsauthfailure) |
4545
| [image:mountAfter](#imagemountafter) | [state](#state) |
46-
| [image:uploadAfter](#imageuploadafter) | [{{config.name}}:{{preview.parent.id}}:updateAfter](#confignameidupdateafter) |
46+
| [image:uploadAfter](#imageuploadafter) | [{{config.name}}:{{preview.contentType.id}}:updateAfter](#confignameidupdateafter) |
4747
| | |
4848

4949
## Event details
@@ -55,7 +55,6 @@ Events starting with `contentType:` are triggered for every content type on the
5555
* `tab-item:mountAfter`
5656

5757

58-
5958
### `contentType:createAfter`
6059

6160
```js
@@ -70,7 +69,6 @@ events.on("contentType:createAfter", function (params) {});
7069
[Back to top]
7170

7271

73-
7472
### `contentType:mountAfter`
7573

7674
#### ContentType
@@ -100,7 +98,6 @@ events.on("contentType:mountAfter", function (params) {});
10098
[Back to top]
10199

102100

103-
104101
### `contentType:dropAfter`
105102

106103
```js
@@ -115,7 +112,6 @@ events.on("contentType:dropAfter", function (params) {});
115112
[Back to top]
116113

117114

118-
119115
### `contentType:renderAfter`
120116

121117
```js
@@ -131,7 +127,6 @@ events.on("contentType:renderAfter", function (params) {});
131127
[Back to top]
132128

133129

134-
135130
### `contentType:removeAfter`
136131

137132
```js
@@ -142,13 +137,12 @@ events.on("contentType:removeAfter", function (params) {});
142137
| ------------- | ---------------------------------------------- |
143138
| `contentType` | `ContentType`: `ContentTypeInterface` |
144139
| `index` | `number` |
145-
| `parent` | `ContentType`:`ContentTypeCollectionInterface` |
140+
| `contentType` | `ContentType`:`ContentTypeCollectionInterface` |
146141
| `stageId` | `string` |
147142

148143
[Back to top]
149144

150145

151-
152146
### `contentType:duplicateAfter`
153147

154148
```js
@@ -165,7 +159,6 @@ events.on("contentType:duplicateAfter", function (params) {});
165159
[Back to top]
166160

167161

168-
169162
### `contentType:moveBefore`
170163

171164
```js
@@ -175,15 +168,14 @@ events.on("contentType:moveBefore", function (params) {});
175168
| Params | Type |
176169
| -------------- | ----------------------------------------------------------- |
177170
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
178-
| `sourceParent` | `ContentTypeCollectionInterface` |
179-
| `targetParent` | `ContentTypeCollectionInterface` |
171+
| `sourceContentType` | `ContentTypeCollectionInterface` |
172+
| `targetcontentType` | `ContentTypeCollectionInterface` |
180173
| `targetIndex` | `number` |
181174
| `stageId` | `string` |
182175

183176
[Back to top]
184177

185178

186-
187179
### `contentType:moveAfter`
188180

189181
```js
@@ -193,15 +185,14 @@ events.on("contentType:moveAfter", function (params) {});
193185
| Params | Type |
194186
| -------------- | ----------------------------------------------------------- |
195187
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
196-
| `sourceParent` | `ContentTypeCollectionInterface` |
197-
| `targetParent` | `ContentTypeCollectionInterface` |
188+
| `sourcecontentType` | `ContentTypeCollectionInterface` |
189+
| `targetcontentType` | `ContentTypeCollectionInterface` |
198190
| `targetIndex` | `number` |
199191
| `stageId` | `string` |
200192

201193
[Back to top]
202194

203195

204-
205196
### `contentType:redrawAfter`
206197

207198
```js
@@ -224,7 +215,6 @@ events.on("contentType:redrawAfter", function (params) {});
224215
[Back to top]
225216

226217

227-
228218
### `column:dragStart`
229219

230220
```js
@@ -239,7 +229,6 @@ events.on("column:dragStart", function (params) {});
239229
[Back to top]
240230

241231

242-
243232
### `column:dragStop`
244233

245234
```js
@@ -254,7 +243,6 @@ events.on("column:dragStop", function (params) {});
254243
[Back to top]
255244

256245

257-
258246
### `column:initializeAfter`
259247

260248
```js
@@ -265,16 +253,15 @@ events.on("column:initializeAfter", function (params) {});
265253
| --------- | ------------- |
266254
| `column` | `Column` |
267255
| `element` | `Element` |
268-
| `parent` | `ColumnGroup` |
256+
| `contentType` | `ColumnGroup` |
269257

270258
[Back to top]
271259

272260

273-
274-
### `image:{{preview.parent.id}}:assignAfter` {#imageidassignafter}
261+
### `image:{{preview.contentType.id}}:assignAfter` {#imageidassignafter}
275262

276263
```js
277-
events.on(`image:${this.parent.id}:assignAfter`, function (params) {});
264+
events.on(`image:${this.contentType.id}:assignAfter`, function (params) {});
278265
```
279266

280267

@@ -285,7 +272,6 @@ events.on(`image:${this.parent.id}:assignAfter`, function (params) {});
285272
[Back to top]
286273

287274

288-
289275
### `image:mountAfter`
290276

291277
```js
@@ -300,7 +286,6 @@ events.on("image:mountAfter", function (params) {});
300286
[Back to top]
301287

302288

303-
304289
### `image:uploadAfter`
305290

306291
```js
@@ -314,11 +299,10 @@ events.on("image:uploadAfter", function (params) {});
314299
[Back to top]
315300

316301

317-
318-
### `stage:{{preview.parent.stageId}}:readyAfter`
302+
### `stage:{{preview.contentType.stageId}}:readyAfter`
319303

320304
```js
321-
events.on(`stage:${this.parent.stageId}:readyAfter`, function (params) {});
305+
events.on(`stage:${this.contentType.stageId}:readyAfter`, function (params) {});
322306
```
323307

324308
| Params | Type |
@@ -328,11 +312,10 @@ events.on(`stage:${this.parent.stageId}:readyAfter`, function (params) {});
328312
[Back to top]
329313

330314

331-
332-
### `stage:{{preview.parent.stageId}}:renderAfter`
315+
### `stage:{{preview.contentType.stageId}}:renderAfter`
333316

334317
```js
335-
events.on(`stage:${this.parent.stageId}:renderAfter`, function (params) {});
318+
events.on(`stage:${this.contentType.stageId}:renderAfter`, function (params) {});
336319
```
337320

338321
| Params | Type |
@@ -342,7 +325,6 @@ events.on(`stage:${this.parent.stageId}:renderAfter`, function (params) {});
342325
[Back to top]
343326

344327

345-
346328
### `stage:interactionStart`
347329

348330
```js
@@ -356,7 +338,6 @@ events.on("stage:interactionStart", function () {});
356338
[Back to top]
357339

358340

359-
360341
### `stage:interactionStop`
361342

362343
```js
@@ -370,11 +351,10 @@ events.on("stage:interactionStop", function () {});
370351
[Back to top]
371352

372353

373-
374-
### `stage:{{preview.parent.stageId}}:toggleFullscreen` {#stageidtogglefullscreen}
354+
### `stage:{{preview.contentType.stageId}}:toggleFullscreen` {#stageidtogglefullscreen}
375355

376356
```js
377-
events.on(`stage:${this.parent.stageId}:toggleFullscreen`, function (params) {});
357+
events.on(`stage:${this.contentType.stageId}:toggleFullscreen`, function (params) {});
378358
```
379359

380360
| Params | Type |
@@ -384,7 +364,6 @@ events.on(`stage:${this.parent.stageId}:toggleFullscreen`, function (params) {})
384364
[Back to top]
385365

386366

387-
388367
### `previewData:updateAfter`
389368

390369
```js
@@ -398,7 +377,6 @@ events.on("previewData:updateAfter", function (params) {});
398377
[Back to top]
399378

400379

401-
402380
### `childContentType:sortStart`
403381

404382
```js
@@ -414,7 +392,6 @@ events.on("childContentType:sortStart", function (params) {});
414392
[Back to top]
415393

416394

417-
418395
### `childContentType:sortUpdate`
419396

420397
```js
@@ -432,7 +409,6 @@ events.on("childContentType:sortUpdate", function (params) {});
432409
[Back to top]
433410

434411

435-
436412
### `stage:error`
437413

438414
```js
@@ -446,11 +422,10 @@ events.on("stage:error", function (params) {});
446422
[Back to top]
447423

448424

449-
450-
### `stage:{{preview.parent.stageId}}:readyAfter` {#stageidreadyafter}
425+
### `stage:{{preview.contentType.stageId}}:readyAfter` {#stageidreadyafter}
451426

452427
```js
453-
events.on(`stage:${this.parent.stageId}:readyAfter`, function (params) {});
428+
events.on(`stage:${this.contentType.stageId}:readyAfter`, function (params) {});
454429
```
455430

456431
| Params | Type |
@@ -459,13 +434,11 @@ events.on(`stage:${this.parent.stageId}:readyAfter`, function (params) {});
459434

460435
[Back to top]
461436

462-
### `stage:{{preview.parent.stageId}}:readyAfter` {#stageidreadyafter}
463437

464-
465-
### `stage:{{preview.parent.stageId}}:masterFormatRenderAfter` {#stageidmasterformatrenderafter}
438+
### `stage:{{preview.contentType.stageId}}:masterFormatRenderAfter` {#stageidmasterformatrenderafter}
466439

467440
```js
468-
events.on(`stage:${this.parent.stageId}:masterFormatRenderAfter`, function (params) {});
441+
events.on(`stage:${this.contentType.stageId}:masterFormatRenderAfter`, function (params) {});
469442
```
470443

471444
| Params | Type |
@@ -475,7 +448,6 @@ events.on(`stage:${this.parent.stageId}:masterFormatRenderAfter`, function (para
475448
[Back to top]
476449

477450

478-
479451
### `stage:updateAfter`
480452

481453
```js
@@ -489,7 +461,6 @@ events.on("stage:updateAfter", function (params) {});
489461
[Back to top]
490462

491463

492-
493464
### `stage:childFocusStart`
494465

495466
```js
@@ -503,7 +474,6 @@ events.on("stage:childFocusStart", function () {});
503474
[Back to top]
504475

505476

506-
507477
### `stage:childFocusStop`
508478

509479
```js
@@ -517,7 +487,6 @@ events.on("stage:childFocusStop", function () {});
517487
[Back to top]
518488

519489

520-
521490
### `state`
522491

523492
```js
@@ -528,14 +497,13 @@ events.on("state", function (params) {});
528497
| ------- | ----------- |
529498
| `state` | `DataStore` |
530499

531-
### `{{config.name}}:{{preview.parent.id}}:updateAfter` {#confignameidupdateafter}
532-
500+
[Back to top]
533501

534502

535-
### `{{config.name}}:{{preview.parent.id}}:updateAfter` {#confignameidupdateafter}
503+
### `{{config.name}}:{{preview.contentType.id}}:updateAfter` {#confignameidupdateafter}
536504

537505
```js
538-
events.on(`${this.config.name}:${this.parent.id}:updateAfter`, function (params) {});
506+
events.on(`${this.config.name}:${this.contentType.id}:updateAfter`, function (params) {});
539507
```
540508

541509
| Params | Type |
@@ -545,7 +513,6 @@ events.on(`${this.config.name}:${this.parent.id}:updateAfter`, function (params)
545513
[Back to top]
546514

547515

548-
549516
### `googleMaps:authFailure`
550517

551518
```js

0 commit comments

Comments
 (0)