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

openGallery Method


  • openGallery(params?: object, action?: "layout" | "fillPlaceholders" ) : Promise < void >
  • Opens the Asset Manager with the listed asset tabs to add a new image to the design.

    let editor = await CustomersCanvas.IframeApi.loadEditor(iframe, product, config);
    editor.openGallery({ tabs: ["My Files", "Public Gallery", "Deposit Photos"] });

    You can open the Action Manager to change product layouts as follows:

    editor.openGallery({ tabs: ["Layouts"] }, "layout");


    • Optional params: object

      Parameters defining the appearance of the Asset Manager.

      • Optional tabs: string []

        An array of tabs available for selecting the assets.

    • Optional action: "layout" | "fillPlaceholders"

      An action that should be applied to the product, either "layout" to change layouts or "fillPlaceholders" to automatically fill out image placeholders. By default, the Action Manager opens to add an image to the design.

    Returns Promise < void >