removeContainer Method

Callable

  • removeContainer(index: number ) : void
  • Removes a channel container from the print area.

    example
    // 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) {
                // Remove the fourth container.
                product.currentSurface.printAreas[0].removeContainer(3);
                // Display the remaining containers.
                console.log(product.currentSurface.printAreas[0].getContainers());
            });
        });
    

    Parameters

    • index: number

      An index of the container to be removed (a value greater than two). Note that you cannot remove basic containers: Background, Main, or Foreground.

    Returns void