setSurfaces
- Less than a minute to read
Replaces a product in the editor by using surface definitions. This command is an equivalent of the setSurfaces method from the IFrame API.
Params
surfaces
- an array of the new surfaces.
For the complete list of parameters, you can refer to ISetSurfacesOptions.
Example
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"setSurfaces": {
"surfaces": [{
"{{ #if $['editor'].stateId !== '' }}": {
"stateId": "{{ $['editor'].stateId }}",
"surface": 0
}
}]
}
}
}