Command: setPrintArea

This is an equivalent of the setPrintAreas method from IFrame API, but only for one surface (either a specified surface or the current surface).

Unlike changeLayout command, the design is loaded completely, including the background.


  • data - the same print area definition as used in the setPrintAreas.
  • surfaceIndex - which surface to replace. If omitted, the currently visible surface is modified.
  • options - history management options. See the setPrintAreas docs for more details.


    "type": "canvas", 
    "name": "editor",
    "params": {
        "initial": { ... }, 
        "setPrintArea": {
            "discardChanges": false,
            "data": {
                "designFile": "{{'demos/cards/'+$['designs']}}"