Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal editor doc #78

Merged
merged 2 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/pages/services/aem-universal-editor/api/events/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,6 @@ The Universal Editor sends defined events to remote applications. In case the re

### Working with Events

The Universal Editor offers a list of events that extensions can subscribe to in order to respond to changes in content or the user interface.
Refer to this [document](https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/developing/universal-editor/events) for the available event list.

For instance, here's an example of how to subscribe to the `aue:ui-select` event:

```js

useEffect(() => {
(async () => {
const guestConnection = await attach({id: extensionId});
...
await guestConnection.host.remoteApp.addEventListener('aue:ui-select', console.log('event recieved!'));
...
})();
}, []);
```

If your business logic requires sending an event to the Universal Editor, you can use the `dispatchEvent` method.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

triggerEvent()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmyJZhao updated

Here's an example of how to dispatch the `aue:ui-select` event:

Expand Down
Loading