- What is Live Preview?
- Custom Event Listeners
- Types of events
- Common use cases
- Event Body
What is Live Preview?
To make the experience of editors smooth in the Venue Editor, we have to ensure there is a true WYSIWYG experience - i.e, when a user makes a change on the left hand content editing panel, the preview on the right hand panel should be almost instantaneous.
- Create a livepage
- Go to People Tab, create a user and generate a magic link. Paste the content of your clipboard in a new browser tab.
- Make changes and click on Save & Publish changes.
- Notice that on the link generated URL, the changes is automatically updated without the user having to refresh the page.
Custom Event Listeners
Types of events
As a developer, you are able to add customizations such as alert/notification functions for these different events:
Common use cases
Common use cases for addEventListener:
- Trigger notification alert dialog on the webpage when a block is created
- Scroll automatically to the block that was just updated
- Re-initialize 3rd party script SDK
- Send data for analytics service and many more.
Body of each events are as such:
You may write your own custom logic as such