swapSurfaces
Swaps two surfaces (pages) in the loaded product. This command is an equivalent of the swapSurfaces method of the IFrame API.
Params
lhsSurface: the first surface (page) to swap.rhsSurface: the second surface (page) to swap.
Example
The following example shows how to swap the first page of the loaded product with the second page.
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"swapSurfaces": [{
"lhsSurfaceIndex": 0,
"rhsSurfaceIndex": 1
}]
}
}