Edit in GitHubLog an issue

Working with Custom Events

The Universal Editor sends defined events to the remote application, on top of this CustomEvent can also be sent directly from the Extension to the remote application.

Working with Custom Events

You can send events to the remote application using the triggerEvent method.

Copied to your clipboard
useEffect(() => {
(async () => {
const guestConnection = await attach({id: extensionId});
...
await guestConnection.host.remoteApp.triggerEvent('my-custom-event',
'body',
{
example: 'payload'
}
);
...
})();
}, []);

API Reference

TriggerEvent API

| Field | Type | Required | Description | | eventName | string | ✔️ | Name of the event | | selector | string | ✔️ | A valid CSS selector string| | payload | Serializable object| An object that, in addition of the properties defined in the Event Constructor |

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.