Configuration parameters
Once you have initialized your Beefree application, you can pass a series of configuration parameters to it.
The default configuration should be something like the following:
beeConfig: {
uid: 'CmsUserName', // [mandatory]
container: 'bee-plugin-container', // [mandatory]
autosave: 30, // [optional, default:false]
language: 'en-US', // [optional, default:'en-US']
trackChanges: true or false, // [optional, default: false]
specialLinks: specialLinks, // [optional, default:[]]
mergeTags: mergeTags, // [optional, default:[]]
mergeContents: mergeContents, // [optional, default:[]]
preventClose: false, // [optional, default:false]
editorFonts : {}, // [optional, default: see description]
contentDialog : {}, // [optional, default: see description]
defaultForm : {}, // [optional, default: {}]
roleHash : "", // [optional, default: ""]
rowDisplayConditions : {}, // [optional, default: {}]
workspace: { // [optional, default: {type : 'default'}]
editSingleRow: false // [optional, default: false]},
commenting: false, // [optional, default: false]}
commentingThreadPreview: true, // [optional, default: true]}
commentingNotifications: true, // [optional, default: true]}
disableLinkSanitize: true, // [optional, default: false]}
onSave: function(jsonFile, htmlFile) { /* Implements function for save */ }, // [optional]
onChange: function(jsonFile, response) { /* Implements function for change */ }, // [optional]
onSaveAsTemplate: function(jsonFile) { /* Implements function for save as template (only JSON file) */ }, // [optional]
onAutoSave: function(jsonFile) { /* Implements function for auto save */ }, // [optional]
onSend: function(htmlFile) { /* Implements function to send the message */ }, // [optional]
onLoad: function(jsonFile) { /* Implements function to perform an action once the template is loaded */}, // [optional]
onError: function(errorMessage) { /* Implements function to handle error messages */ } // [optional]
onWarning: function(alertMessage) { /* Implements function to handle error messages */ } // [optional]
}
Here is a brief description of the parameters, events and methods:
Parameters
Parameter | Description | Required | Default | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
uid | An alphanumeric string that identifies the user and allows the plugin to load resources for that user (e.g. images).
It uniquely identifies a user of the Plugin. When we say “uniquely”, we mean that:
|
Yes | |||||||||||||||||||||||||||||||||||||||||||||||
container | Identifies the id of div element that contains BEE Plugin | Yes | |||||||||||||||||||||||||||||||||||||||||||||||
language |
4-letter language identifier (e.g. “en-US”, ISO 639-1 format).
Available Languages
|
No | "en-US" |
||||||||||||||||||||||||||||||||||||||||||||||
trackChanges | Track message changes in the editor via the “onChange” callback. See “Tracking message changes” for further details. | No | false |
||||||||||||||||||||||||||||||||||||||||||||||
specialLinks | An array of custom links that may be used in the message (e.g. unsubscribe). See “extending the editor” for further details. | No | [] |
||||||||||||||||||||||||||||||||||||||||||||||
mergeTags | An array of merge tags that may be used in the message (e.g. first name of the recipient). See “extending the editor” for further details. | No | [] |
||||||||||||||||||||||||||||||||||||||||||||||
mergeContents | An array of content elements that may be used in the message (e.g. small blocks of HTML). See “extending the editor” for further details. | No | [] |
||||||||||||||||||||||||||||||||||||||||||||||
preventClose | Whether an alert should be shown when the user attempts to leave the page before saving. | No | false |
||||||||||||||||||||||||||||||||||||||||||||||
editorFonts |
Paid plans only
Customize the list of available fonts in the editor’s text toolbar and the BODY settings panel. |
No | See “Font management” for the default object. | ||||||||||||||||||||||||||||||||||||||||||||||
roleHash |
Paid plans only
Identifies the user role:
See “Roles and permissions” for further details. |
No | "" |
||||||||||||||||||||||||||||||||||||||||||||||
rowDisplayConditions |
Paid plans only (Core and above)
Allows for conditional statements in email messages. |
No | {} |
||||||||||||||||||||||||||||||||||||||||||||||
workspace |
Paid plans only
Configure the initial workspace for loading the editor. Currently used for AMP content visibility. |
No | {type : 'default'} |
||||||||||||||||||||||||||||||||||||||||||||||
contentDialog |
Paid plans only
Allows to exchange data with BEE Plugin using a UI layer you control. |
No | {} |
||||||||||||||||||||||||||||||||||||||||||||||
defaultForm |
Available only in Page Builder, for paid plans
This should contain a |
No | {} |
||||||||||||||||||||||||||||||||||||||||||||||
commenting |
Paid plans only (Core and above)
Enables commenting on content blocks and rows. See Commenting for further details. |
No | false |
||||||||||||||||||||||||||||||||||||||||||||||
commentingThreadPreview |
Paid plans only (Core and above)
Enables a pop-over preview on the stage for comments. |
No | true |
||||||||||||||||||||||||||||||||||||||||||||||
commentingNotifications |
Paid plans only (Superpowers)
Enables notifications of new comments in co-editing. |
No | true |
||||||||||||||||||||||||||||||||||||||||||||||
disableLinkSanitize |
Paid plans only (Core and above)
Disables link validation for URLs, including telephone number or SMS to enable merge content use. |
No | false |