New online demos available.  

Command: setRemoteMockup

Like changeMockup, it replaces the mockup image in the editor. However, instead of a path on Customer's Canvas backend, you should pass a URL to the image you want to insert. It is extremely useful when the mockup image is generated.

Important! This method will work if in the initial command you already specify some mockup (as a regular image, not a PSD file!).

Params

  • surfaceIndex - which surface to modify. If omitted, the currently visible surface is modified.
  • mockup - up | down - which mockup should be updated.
  • url - a URL to a the image to use as a mockup

Example

{
    "type": "ajax",
    "name": "mockup-recolor",
    "params": {
        ...
    }
},
{
    "type": "canvas", 
    "name": "editor",
    "params": {
        "inital": { ... }, 
         "setRemoteMockup": [{
            "surfaceIndex": 0,
            "mockup": "down",
            "url": "{{ $['mockup-recolor'].response || '' }}"
           }]
     }
}