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.
interface EditorMessage<T> {
type: 'item:updated' | 'template:loaded' | 'template:size:selected'; // type of the message
templateId?: string; // Only for output messages. Id of the open template
sizeId?: string; // Only for output messages. Id of the selected size
itemId?: string; // Id of the affected item
data: T; // payload
}