// Specify a container definition of a spot color.
const containerDefinition = {
name: "spot",
type: "spotColor",
previewColor: "rgba(0,255,0,1)"
};
const containerIndex = 4;
// Load the editor.
CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition)
// If the editor has been successfully loaded.
.then(function (editor) {
// When we get the product.
editor.getProduct().then(function (product) {
// Insert a container.
product.currentSurface.printAreas[0].insertContainer(containerDefinition, containerIndex);
});
});