IConfiguration Interface

A structure containing the web-to-print editor configuration. Extends IUiConfig.

example
<script>
    ...
    // Defining the editor configuration.
    configuration = {
        canvas: {
            color: "grey"
        },
        grid: {
            stepX: 0.5,
            stepY: 0.5
        },
        initialMode: "Advanced",
        customStyle: "mySiteStyles",
        rendering: {
            proofImageMockupEnabled: false
        },
        userInfo: {
            "FirstName": "John",
            "LastName": "Wood",
            "Phone": "1234567890"
        },
        widgets: {
            ObjectInspector: {
                dndEnabled: false
            }
        }
    };

    // Loading the editor with the given configuration.
    CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition, configuration).then(function(e) {editor = e});
    ...
</script>

Properties

Optional alignToSafetyLineName

alignToSafetyLineName: string

A name of a safety line to which an item will be aligned; if there is no safety line with the name, then the item will be aligned to the first safety line in the safety lines array. The default value is "bleed".

Optional arbitraryResizeForImageItemEnabled

arbitraryResizeForImageItemEnabled: boolean

If enabled, a user can resize an image item in an editor without keeping the original aspect ratio. Otherwise, images can be resized only proportionally. The default value is false.

Optional autoLoadUserInfo

autoLoadUserInfo: boolean

If true, then a product is automatically populated with predefined data when it is loaded into the editor; the Load my info button is not displayed. The default value is false. For details, see the Working with User Data topic.

Optional canvas

canvas: ICanvasConfig

A structure containing canvas settings in the editor.

Optional customStyle

customStyle: string

A name of a CSS file (without extension) that will be loaded within the designer page; the file should be located in the ~/Configuration/customCss/ folder. You should pass this property to loadEditor but cannot specify it in clientConfig.json.

Optional defaultItemsConfig

defaultItemsConfig: IDefaultItemsConfig

The configuration of design elements being added to a product. For details, see the Default Parameters of Design Elements topic.

Optional defaultLanguage

defaultLanguage: string

A default interface language. The default value is "en". For details, see the Localization of Customer's Canvas topic.

Optional defaultProductTheme

defaultProductTheme: string

Allows for specifying the default color theme.

Optional deleteItemConfirmationEnabled

deleteItemConfirmationEnabled: boolean

Enables the confirmation dialog when deleting an item from a product. The default value is false.

Optional fontList

fontList: string [] | object

A list of fonts available for a user in the editor; all these fonts should be uploaded to the font folder on server, by default it is ~/Fonts/. For details, see the Custom Fonts topic.

Optional fontListMode

fontListMode: FontListModeType

A mode of the font list, either "Simple" or "Advanced". The simple mode allows a user to select font and set font size; the advanced mode also provides an ability to change font style. The default value is "Advanced".

Optional galleryOnly

galleryOnly: boolean

Displays only the Image Gallery containing the private tab; the web-to-print editor is not displayed in this mode. The default value is false.

Optional grid

The grid configuration. For details, see the Markings topic.

Optional imageEditorEnabled

imageEditorEnabled: boolean

Enables the Image Editor. The default value is true.

Optional initialMode

initialMode: ModelModeType

The initial mode of the editor, either Simple or Advanced. The default value is Simple.

Optional loadConfigFromState

loadConfigFromState: boolean

Enables loading the config settings from state files.

Optional loadUserInfoButtonEnabled

loadUserInfoButtonEnabled: boolean

Displays the Load my info button. The default value is false. For details, see the Working with User Data topic.

Optional newImageName

newImageName: string

A default name for a new image layer: the first layer is named newImageNameValue, the second one is newImageNameValue_1, the third layer is newImageNameValue_2, etc. By default the name of the image file is used.

Optional perSurfaceConfiguration

perSurfaceConfiguration: IPerSurfaceConfiguration

A configuration of widgets, that is defined for separate surfaces.

Optional preloader

preloader: object

An object that sets up the embedded preloader of Customer's Canvas. For an example, refer to The Product Loading Screen topic.

preloader declaration

  • Optional enabled: boolean

    Enables the embedded preloader of Customer's Canvas. If it is false, then you can implement your own preloader. The default value is true.

  • Optional errorMessage: string

    This message shows when an error occurs. If it is not set, then "Initialization error." message shows by default.

  • Optional firstTimeMessage: string

    This message shows when a product is being loaded for the first time. If it is not set, then "The product is being configured for the first time. It may take a while." message is shown by default.

Optional productThemes

productThemes: object

A predefined set of color themes for the product.

productThemes declaration

Optional restoreProductOnReloadEnabled

restoreProductOnReloadEnabled: boolean

Enables restoring product state when the design page is reloaded; if false, then product is reverted on reloading. The default value is true.

Optional revertProductConfirmationEnabled

revertProductConfirmationEnabled: boolean

Enables the confirmation dialog when reverting a product to its initial state. The default value is true.

Optional spellCheckEnabled

spellCheckEnabled: boolean

Enables spell checking for product text fields and for the Rich text dialog. The default value is false.

Optional theme

theme: string

Name of a theme. Possible values are "BootstrapDefault", "BootstrapEmpty", or "Md". The default value is "Md". You should pass this property to loadEditor but cannot specify it in clientConfig.json.

Optional userId

userId: string

The identifier of the user who currently works with the editor.

Optional userInfo

userInfo: object

Data to populate the loaded product template with.

userInfo declaration

  • [key: string ]: string

Optional variableItemsMaskSymbol

variableItemsMaskSymbol: string

A symbol marking design elements as variable items. By default, it is "%".

Optional watermark

watermark: IWatermarkConfig

The watermark configuration. For details, see the Watermarks topic.

Optional widgets

widgets: IWidgetsConfig

The configuration of the editor widgets. For details, see the Customizing User Interface topic.