You’re viewing outdated documentation. View the latest Customer’s Canvas On-Premises documentation.

removeSurface Method

Applies to: Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · Archived documentation

Callable

  • Removes the given surface (page) from the product.

    example
    editor.getProduct()
        .then(function (product) {
            // Remove the current surface.
            product.removeSurface(product.currentSurface)
                .then(function(result) {
                    console.log("Surface removed");
                });
        })
        // If there was an error thrown while removing the surface.
        .catch(function (error) {
            console.error("Removing the surface failed with exception: ", error);
        });

    Parameters

    • surface: Surface

      A surface (page) to remove.

    Returns Promise < Product >

    The product instance where the surface (page) was removed from.