Events


onDesignLoad

This event is called when your design is loaded in the editor.

unlayer.addEventListener('onDesignLoad', function(data) {
  // Design is loaded
  var json = data.design; // design json
})

onImageUpload

This event is called when an image is uploaded by the user.

unlayer.addEventListener('onImageUpload', function(data) {
  var image = data.image;
  var url = image.url;
  var width = image.width;
  var height = image.height;
})