Embedded Widget

Use a banner creation tool inside your own app

Integration

The editor is embedded in the host app as an iframe:

embeddedEditorURL can be retrieved from the administrative API

Get User Access URL

GET https://api.adrapid.com/v1/api/users/:userId/access/

This methods gets an URL to login a user into Adrapid system and a URL to create an embedded editor in a iframe tag.

Path Parameters

Name
Type
Description

:userId

string

Id of the user

Query Parameters

Name
Type
Description

template_id

string

Template id to open in the editor. If not set a template selector interface will be show with the user templates

options

json

Editor customizations.

Widget communication

The widget can communicate with its container when is set inside an iframe through postMessage

Messages structure

Output messages

List of messages that the editor will send.

template:loaded

item:updated

Example messages with different updates:

Updated text

Updated item name

Update item media (image)

Updated item position

Updated property

template:size:selected

template:items:updated

Same structure as template:loadded but fired when a item is added or removed from the template example message

Timeline messages

Messages related user interaction with the timeline.

item:animation:added

Fires when an animation is added to an item.

item:animation:removed

Fires when an animation is removed from an item.

animation:keyframe:added

Fires when a keyframe is added to an animation.

animation:keyframe:removed

Fires when a keyframe is removed from an animation.

Fires when a keyframe is updated.

template:duration:updated

Fires when template duration is updated.

template:indexes:updated

Fires when item indexes are updated. Data contains an array with the new order of items in the timeline.

Groups messages

Messages regarding group items.

template:item:group

Fires when a new group is created.

template:item:ungroup

Fires when and item is ungrouped.

template:item:detach

Fires when a single item is removed from its current group.

Input messages

With inputs messages you can edit some values of the template from the parent container. This actions will add an do/redo action in the editor and will be saved in the template.

Updating text

Update image

Update css property

Last updated

Was this helpful?