The Embedded Unified Crop Connector requires MM 5.6
Integration Digizuite DAM 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.
Insert into any Host Application
The Unified Crop Connector can be inserted into any host application as an iframe to easily provide access to an asset and the crop functionallity.
The url syntax for accessing the crop feature for a specific asset is.https://[customer-mediamamanger-url]/embedded/crop/[assetid]?embedded=true&accessKey=[valid accesskey]
Then you see the below view.
You can read about the crop functionnaity here MM5.6 Asset editing (crop and trim)
Listening to events
Besides from asset message, then the Unified DAM Connector also posts a message when trying to change the URL from menu (wanting to change MM URL) and then when the Unified DAM Connector is initialized properly so that the host application knows. The 3 important message types are:
DigizuiteInitPostMessage
- So you know it is the Digizuite IframeDigizuiteChangeUrlPostMessage
- If the user tries to change URLDigizuiteAssetPostMessage
- When a user clicks on asset. When multi-select you receive more.
As mentioned above, the iframe will post messages to its parent / host application. Listening to these events are what makes the magic. It can be done in different ways and most modern frameworks have ways for handling it. But since all are JavaScript frameworks then the most basic way in any kind of application would be to use ‘addEventListener’.
window.addEventListener("message", (event) => { if (event && event.data && event.data.messageType) { ....... } }, false);