This is an old documentation. Go to the latest Customer's Canvas docs

addContainer Method


  • Adds a channel container to the print area.

    // Initialize a product with the "card.psd" template.
    const productDefinition = {
        surfaces: ["card"]
    // 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) {
                // Add a container to the print area.
                    name: "foil",
                    type: "texture",
                    texture: "texture.jpg",
                    // Expects a translated string for the FOIL key in translations.json.
                    translationKey: "ObjectInspector.FOIL"


    Returns Promise < Container >

    An instance of the added container.