Integrate into almost any other application using the Unified DAM Connector. It will give you a head start on development efforts and reduce both implementation time and risk.
...
Code Block |
---|
@HostListener('window:message', ['$event'])
onMessageReceived(event: any) {
console.log(`${this.onMessageReceived.name}`, event);
if (event && event.data && event.data.messageType) {
const message: DigizuitePostMessage = event.data;
if (message.messageType === MessageType.SmartPickerInitialized) {
this.initializeSmartPicker();
} else if (message.messageType === MessageType.ChangeUrl) {
const baseUrl = message.mmUrl.endsWith('/') ? message.mmUrl.slice(0, -1) : message.mmUrl;
this.setNewTempUrl(baseUrl + '/embedded');
} else if (message.messageType === MessageType.AssetMessage) {
const asset = message.asset;
this.assetReceived.emit(asset);
}
}
} |
Events
Insert event
Code Block |
---|
|
export interface AssetMessage {
assetId: number;
assetType: string;
selectedQualityId: number;
itemId: number;
title: string;
description: string;
downloadUrl: string;
thumb: string;
extension: string;
lastModifiedTimeInMs: number;
hashSha1: string;
isCustomFormat: boolean;
} |
When the insert button is clicked on the asset card, the event emitted contains the following information about the asset