Customer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

openGallery Method

Callable

  • 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.

    example
    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:

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

    Parameters

    • 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 >