Skip to content

Commit 036b22a

Browse files
committed
MAGEDOC-3440: Edit events topic
Updating parameter docs based on testing of events within Quote
1 parent ef66b31 commit 036b22a

File tree

1 file changed

+34
-37
lines changed

1 file changed

+34
-37
lines changed

docs/reference/events.md

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@ The following table lists the Page Builder events you can bind to and handle wit
5050

5151
## `contentType:*` events
5252
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:
53+
5354
* `text:createAfter`
5455
* `row:mountAfter`
5556
* `tab-item:mountAfter`
5657

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

6160
```js
@@ -65,7 +64,7 @@ events.on("contentType:createAfter", function (params) {});
6564
| Params | Type |
6665
| ------------- | ----------------------------------------------------------- |
6766
| `id` | `string` |
68-
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
67+
| `contentType` | `ContentType` or `ContentTypeCollection` |
6968

7069
[Back to top]
7170

@@ -85,10 +84,6 @@ events.on("contentType:mountAfter", function (params) {});
8584
| `contentType` | `ContentType` |
8685

8786

88-
89-
90-
### `contentType:mountAfter`
91-
9287
#### ContentTypeCollection
9388

9489
```js
@@ -113,7 +108,7 @@ events.on("contentType:dropAfter", function (params) {});
113108
| Params | Type |
114109
| ------------- | ----------------------------------------------------------- |
115110
| `id` | `string` |
116-
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
111+
| `contentType` | `ContentType` or `ContentTypeCollection` |
117112

118113
[Back to top]
119114

@@ -127,13 +122,12 @@ events.on("contentType:renderAfter", function (params) {});
127122
| Params | Type |
128123
| ------------- | ----------------------------------------------------------- |
129124
| `id` | `string` |
130-
| `element` | `Element` |
131-
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
125+
| `element` | `HTMLElement` |
126+
| `contentType` | `ContentType` or `ContentTypeCollection` |
132127

133128
[Back to top]
134129

135130

136-
137131
### `contentType:removeAfter`
138132

139133
```js
@@ -142,9 +136,9 @@ events.on("contentType:removeAfter", function (params) {});
142136

143137
| Params | Type |
144138
| ------------- | ---------------------------------------------- |
145-
| `contentType` | `ContentType`: `ContentTypeInterface` |
139+
| `contentType` | `ContentType` or `ContentTypeCollection` |
146140
| `index` | `number` |
147-
| `contentType` | `ContentType`:`ContentTypeCollectionInterface` |
141+
| `parentContentType` | `ContentType` or `ContentTypeCollection` |
148142
| `stageId` | `string` |
149143

150144
[Back to top]
@@ -159,8 +153,8 @@ events.on("contentType:duplicateAfter", function (params) {});
159153

160154
| Params | Type |
161155
| ---------------------- | ----------------------------------------------------------- |
162-
| `originalContentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
163-
| `duplicateContentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
156+
| `originalContentType` | `ContentType` or `ContentTypeCollection` |
157+
| `duplicateContentType` | `ContentType` or `ContentTypeCollection` |
164158
| `index` | `number` |
165159
| `direct` | `boolean` |
166160

@@ -175,9 +169,9 @@ events.on("contentType:moveBefore", function (params) {});
175169

176170
| Params | Type |
177171
| -------------- | ----------------------------------------------------------- |
178-
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
179-
| `sourceContentType` | `ContentTypeCollectionInterface` |
180-
| `targetContentType` | `ContentTypeCollectionInterface` |
172+
| `contentType` | `ContentType` |
173+
| `sourceParent` | `ContentTypeCollection` |
174+
| `targetParent` | `ContentTypeCollection` |
181175
| `targetIndex` | `number` |
182176
| `stageId` | `string` |
183177

@@ -192,12 +186,14 @@ events.on("contentType:moveAfter", function (params) {});
192186

193187
| Params | Type |
194188
| -------------- | ----------------------------------------------------------- |
195-
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
196-
| `sourceContentType` | `ContentTypeCollectionInterface` |
197-
| `targetContentType` | `ContentTypeCollectionInterface` |
189+
| `contentType` | `ContentType` |
190+
| `sourceParent` | `ContentTypeCollection` |
191+
| `targetParent` | `ContentTypeCollection` |
198192
| `targetIndex` | `number` |
199193
| `stageId` | `string` |
200194

195+
196+
201197
[Back to top]
202198

203199

@@ -212,7 +208,7 @@ events.on("contentType:redrawAfter", function (params) {});
212208
| Params | Type |
213209
| ------------- | ----------------------------------------------------------- |
214210
| `id` | `string` |
215-
| `contentType` | `ContentTypeInterface` and `ContentTypeCollectionInterface` |
211+
| `contentType` | `ContentType` or `ContentTypeCollection` |
216212

217213
#### Frontend
218214

@@ -232,7 +228,7 @@ events.on("column:dragStart", function (params) {});
232228

233229
| Params | Type |
234230
| --------- | ---------------------- |
235-
| `column` | `ContentTypeInterface` |
231+
| `column` | `ContentTypeCollection` |
236232
| `stageId` | `string` |
237233

238234
[Back to top]
@@ -247,7 +243,7 @@ events.on("column:dragStop", function (params) {});
247243

248244
| Params | Type |
249245
| --------- | ---------------------- |
250-
| `column` | `ContentTypeInterface` |
246+
| `column` | `ContentTypeCollection` |
251247
| `stageId` | `string` |
252248

253249
[Back to top]
@@ -262,8 +258,8 @@ events.on("column:initializeAfter", function (params) {});
262258
| Params | Type |
263259
| --------- | ------------- |
264260
| `column` | `Column` |
265-
| `element` | `Element` |
266-
| `contentType` | `ColumnGroup` |
261+
| `element` | `Element` |
262+
| `columnGroup` | `ColumnGroup` |
267263

268264
[Back to top]
269265

@@ -293,6 +289,7 @@ events.on("image:mountAfter", function (params) {});
293289
| Params | Type |
294290
| ---------------- | -------- |
295291
| `id` | `string` |
292+
| `contentType` | `ContentType` |
296293
| `expectChildren` | `number` |
297294

298295
[Back to top]
@@ -343,25 +340,25 @@ events.on(`stage:${this.contentType.stageId}:renderAfter`, function (params) {})
343340
### `stage:interactionStart`
344341

345342
```js
346-
events.on("stage:interactionStart", function () {});
343+
events.on("stage:interactionStart", function (params) {});
347344
```
348345

349-
| Params | Type |
350-
| ------ | ---- |
351-
| `None` | |
346+
| Params | Type |
347+
| --------- | -------- |
348+
| `stageId` | `string` |
352349

353350
[Back to top]
354351

355352

356353
### `stage:interactionStop`
357354

358355
```js
359-
events.on("stage:interactionStop", function () {});
356+
events.on("stage:interactionStop", function (params) {});
360357
```
361358

362-
| Params | Type |
363-
| ------ | ---- |
364-
| `None` | |
359+
| Params | Type |
360+
| --------- | -------- |
361+
| `stageId` | `string` |
365362

366363
[Back to top]
367364

@@ -403,7 +400,7 @@ events.on("childContentType:sortStart", function (params) {});
403400

404401
| Params | Type |
405402
| ------------------ | --------------------------- |
406-
| `instance` | `Preview` |
403+
| `instance` | `ContentTypeCollection` |
407404
| `originalPosition` | `number` |
408405
| `ui` | `JQueryUI.SortableUIParams` |
409406

@@ -419,11 +416,11 @@ events.on("childContentType:sortUpdate", function (params) {});
419416

420417
| Params | Type |
421418
| ------------------ | --------------------------- |
422-
| `instance` | `ContentTypeInterface` |
419+
| `instance` | `ContentTypeCollection` |
423420
| `newPosition` | `number` |
424421
| `originalPosition` | `number` |
425422
| `ui` | `JQueryUI.SortableUIParams` |
426-
| `event` | `Event` |
423+
| `event` | `jQuery.Event` |
427424

428425
[Back to top]
429426

0 commit comments

Comments
 (0)