White paper: Templates in web-to-print.  Free download

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
      • Optional tabs: string []

        An array of tabs available for selecting the assets.

    • Optional action: "layout" | "fillPlaceholders"

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