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?
optionaldefaultLanguage?: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
canvas?
optionalcanvas?:ICanvasConfig
A structure containing canvas settings.
Inherited from
grid?
optionalgrid?: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
watermark?
optionalwatermark?:IWatermarkConfig
The watermark configuration.
Inherited from
alignToSafetyLineName?
optionalalignToSafetyLineName?: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?
optionalinitialMode?:ModelModeType
The initial mode of the editor, either "Simple" or "Advanced". The default value is "Simple".
Inherited from
canvasOnlyMode?
optionalcanvasOnlyMode?:boolean
The edit mode allowing you to hide all interface elements but the canvas. The default value is false.
Inherited from
loadUserInfoButtonEnabled?
optionalloadUserInfoButtonEnabled?: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?
optionalautoLoadUserInfo?: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
imageEditorEnabled?
optionalimageEditorEnabled?:boolean
Enables the Image Editor. The default value is true.
Inherited from
deleteItemConfirmationEnabled?
optionaldeleteItemConfirmationEnabled?:boolean
Enables the confirmation dialog when deleting an item from a product. The default value is false.
Inherited from
IUiConfig.deleteItemConfirmationEnabled
revertProductConfirmationEnabled?
optionalrevertProductConfirmationEnabled?:boolean
Enables the confirmation dialog when reverting a product to its initial state. The default value is true.
Inherited from
IUiConfig.revertProductConfirmationEnabled
restoreProductOnReloadEnabled?
optionalrestoreProductOnReloadEnabled?: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?
optionalspellCheckEnabled?:boolean
Enables spell checking for product text fields and for the Rich text dialog. The default value is false.
Inherited from
variableItemsMaskSymbol?
optionalvariableItemsMaskSymbol?:string
A symbol marking design elements as variable items. By default, it is "%".
Inherited from
IUiConfig.variableItemsMaskSymbol
fontList?
optionalfontList?: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
fontListMode?
optionalfontListMode?: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
defaultItemsConfig?
optionaldefaultItemsConfig?: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
widgets?
optionalwidgets?:IWidgetsConfig
The configuration of the editor widgets. For details, see the UI overview topic.
Inherited from
userInfo?
optionaluserInfo?:object
Data to populate the loaded product template with.
Index Signature
[key: string]: string | IBarcodeData
Inherited from
perSurfaceConfiguration?
optionalperSurfaceConfiguration?:IPerSurfaceConfiguration
A configuration of widgets, that is defined for separate surfaces.
Inherited from
IUiConfig.perSurfaceConfiguration
productThemes?
optionalproductThemes?:object
A predefined set of color themes and text styles for the product.
Index Signature
[name: string]: IProductThemeConfig
Inherited from
defaultProductTheme?
optionaldefaultProductTheme?:string
Allows for specifying the default color theme.
Inherited from
assetSources?
optionalassetSources?:IAssetSources
Asset sources defined for the Asset Manager.
Inherited from
themeConfiguration?
optionalthemeConfiguration?:IThemeConfiguration
Defines the primary theme color and a new image for the standard preloader.
Inherited from
rendering?
optionalrendering?:IRenderingProperty
The hi-res output and proof images configuration.
Inherited from
userId?
optionaluserId?:string
The identifier of the user who currently works with the editor.
tokenId?
optionaltokenId?:string
The security token required when accessing the user's private data and the Web API endpoints in the secure mode.
customStyle?
optionalcustomStyle?: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?
optionalinlineStyle?:string
An inline CSS style that will be loaded into the Design Editor.
theme?
optionaltheme?: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?
optionalloadConfigFromState?:boolean
Enables loading the config settings from state files.
enableTrace?
optionalenableTrace?:boolean
Overrides
preloader?
optionalpreloader?: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?
optionalenabled?: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?
optionalerrorMessage?:string
This message shows when an error occurs. If it is not set, then "Initialization error." message shows by default.
firstTimeMessage?
optionalfirstTimeMessage?: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?
optionalenableLargeProductLoadOptimization?:boolean