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

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