Skip to main content

Interface: IConfiguration

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

Remarks

Extends IUiConfig.

Example

// Defining the editor configuration.
var 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,
},
},
tokenId: "95c16577-75fe-4145-87ff-c0ba49d1a554",
};

// Loading the editor with the given configuration.
var editor = await CustomersCanvas.IframeApi.loadEditor(
iframe,
productDefinition,
configuration,
);

Extends

Properties

defaultLanguage?

optional defaultLanguage?: string

A default interface language. The default value is "en". For details, see the Localization https://customerscanvas.com/dev/editors/iframe-api/customization/localization.html|Localization topic.

Inherited from

IUiConfig.defaultLanguage


canvas?

optional canvas?: ICanvasConfig

A structure containing canvas settings.

Inherited from

IUiConfig.canvas


grid?

optional grid?: IGridConfig

The grid configuration. For details, see the Grid https://customerscanvas.com/dev/editors/iframe-api/editor-configuration/rulers-grids-snaplines.html|Grid topic.

Inherited from

IUiConfig.grid


watermark?

optional watermark?: IWatermarkConfig

The watermark configuration.

Inherited from

IUiConfig.watermark


alignToSafetyLineName?

optional 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".

Inherited from

IUiConfig.alignToSafetyLineName


initialMode?

optional initialMode?: ModelModeType

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

Inherited from

IUiConfig.initialMode


canvasOnlyMode?

optional canvasOnlyMode?: boolean

The edit mode allowing you to hide all interface elements but the canvas. The default value is false.

Inherited from

IUiConfig.canvasOnlyMode


loadUserInfoButtonEnabled?

optional loadUserInfoButtonEnabled?: boolean

Displays the Load my info button. The default value is false. For details, see the Populating designs with user info topic.

Inherited from

IUiConfig.loadUserInfoButtonEnabled


autoLoadUserInfo?

optional 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 Populating designs with user info topic.

Inherited from

IUiConfig.autoLoadUserInfo


imageEditorEnabled?

optional imageEditorEnabled?: boolean

Enables the Image Editor. The default value is true.

Inherited from

IUiConfig.imageEditorEnabled


deleteItemConfirmationEnabled?

optional deleteItemConfirmationEnabled?: boolean

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

Inherited from

IUiConfig.deleteItemConfirmationEnabled


revertProductConfirmationEnabled?

optional revertProductConfirmationEnabled?: boolean

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

Inherited from

IUiConfig.revertProductConfirmationEnabled


restoreProductOnReloadEnabled?

optional restoreProductOnReloadEnabled?: boolean

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

Inherited from

IUiConfig.restoreProductOnReloadEnabled


spellCheckEnabled?

optional spellCheckEnabled?: boolean

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

Inherited from

IUiConfig.spellCheckEnabled


variableItemsMaskSymbol?

optional variableItemsMaskSymbol?: string

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

Inherited from

IUiConfig.variableItemsMaskSymbol


fontList?

optional fontList?: string[] | { appFonts?: string[]; }

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 Font list topic.

Inherited from

IUiConfig.fontList


fontListMode?

optional 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".

Inherited from

IUiConfig.fontListMode


defaultItemsConfig?

optional defaultItemsConfig?: IDefaultItemsConfig

The configuration of design elements being added to a product. For details, see the Toolbox https://customerscanvas.com/dev/editors/iframe-api/editor-configuration/toolbox.html|Toolbox topic.

Inherited from

IUiConfig.defaultItemsConfig


widgets?

optional widgets?: IWidgetsConfig

The configuration of the editor widgets. For details, see the UI overview topic.

Inherited from

IUiConfig.widgets


userInfo?

optional userInfo?: object

Data to populate the loaded product template with.

Index Signature

[key: string]: string | IBarcodeData

Inherited from

IUiConfig.userInfo


perSurfaceConfiguration?

optional perSurfaceConfiguration?: IPerSurfaceConfiguration

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

Inherited from

IUiConfig.perSurfaceConfiguration


productThemes?

optional productThemes?: object

A predefined set of color themes and text styles for the product.

Index Signature

[name: string]: IProductThemeConfig

Inherited from

IUiConfig.productThemes


defaultProductTheme?

optional defaultProductTheme?: string

Allows for specifying the default color theme.

Inherited from

IUiConfig.defaultProductTheme


assetSources?

optional assetSources?: IAssetSources

Asset sources defined for the Asset Manager.

Inherited from

IUiConfig.assetSources


themeConfiguration?

optional themeConfiguration?: IThemeConfiguration

Defines the primary theme color and a new image for the standard preloader.

Inherited from

IUiConfig.themeConfiguration


rendering?

optional rendering?: IRenderingProperty

The hi-res output and proof images configuration.

Inherited from

IPublicApiConfig.rendering


userId?

optional userId?: string

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


tokenId?

optional tokenId?: string

The security token required when accessing the user's private data and the Web API endpoints in the secure mode.


customStyle?

optional customStyle?: string

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


inlineStyle?

optional inlineStyle?: string

An inline CSS style that will be loaded into the Design Editor.


theme?

optional theme?: string

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


loadConfigFromState?

optional loadConfigFromState?: boolean

Enables loading the config settings from state files.


enableTrace?

optional enableTrace?: boolean

Overrides

IUiConfig.enableTrace


preloader?

optional preloader?: object

An object that sets up the embedded preloader of Customer's Canvas. For an example, refer to Preloader https://customerscanvas.com/dev/editors/iframe-api/customization/preloader.html|Preloader topic.

enabled?

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.

errorMessage?

optional errorMessage?: string

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

firstTimeMessage?

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.


enableLargeProductLoadOptimization?

optional enableLargeProductLoadOptimization?: boolean

Was this page helpful?