Skip to main content

updateContainerSettings

Updates settings of channel containers that implement spot colors and textures in Customer's Canvas. It is a full equivalent to container.update from the IFrame API.

This command allows you to change the settings by the container name. The type of containers cannot be changed.

Params​

This command takes a <string, object> structure. Here, string is the container name and object represents new parameters for this container. You can change the following parameters:

  • name - the new name for the container.
  • translationKey - the translation key of the channel caption. You need to define such a caption in locales.json.
  • previewColor - a string in the CSS format. You can change the color for spotColor containers.
  • texture - a path to the texture image. You can change the color for texture containers.

For the complete list of parameters, you can refer to UpdateContainerSettingsCommand.

Example​

This example supposes that product design has a texture container with the foil name.

{
"type": "design-editor",
"name": "design-editor",
"params": {
"initial": { ... },
"updateContainerSettings": [
{
'foil' : { "texture": "{{ $['texture']._.props.texture }}" }
}
]
}
}
Was this page helpful?