chore: clean up events

This commit is contained in:
Daniel Lautzenheiser
2023-04-19 16:35:12 -04:00
parent 12179e59a2
commit 455bcdc0f2
4 changed files with 4 additions and 14 deletions

View File

@ -87,12 +87,12 @@ Example usage:
```javascript
CMS.registerEventListener({
name: 'prePublish',
name: 'postSave',
handler: ({ author, entry }) => console.info(JSON.stringify({ author, data: entry.data })),
});
```
Supported events are `prePublish`, `postPublish`, `preSave` and `postSave`. The `preSave` hook can be used to modify the entry data like so:
Supported events are `preSave` and `postSave`. The `preSave` hook can be used to modify the entry data like so:
```javascript
CMS.registerEventListener({

View File

@ -270,6 +270,7 @@ Also the `clearMediaControl` and `removeMediaControl` widget control props have
- `isHidden` renamed to `hidden`
- `mediaPaths` is now object of id mapped to an object containing the `path` and optional `alt`
- `useMediaInsert` hook now requires a collection to be passed in. Its callback function now receives an object containing the `path` and optional `alt` instead of a string.
- `prePublish` and `postPublish` events have been dropped.
## Other Changes