Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
This feature is available on Beefree SDK paid plans only.
The builder’s color palette gathers a list of the default colors to display from multiple sources in order to create a convenient palette of color selections when the editor loads.
Specifically, colors are gathered as follows:
3 colors from the body (message background, content background, link) + black (#000000)
custom colors (as many as customers want)
7 most recently used colors
Use the options outlined below to customize the default color palette.
The builder allows you to configure a custom color palette (per user), by modifying the client-side configuration. This, for instance, allows you to provide users with easy access to their company’s brand colors.
If no color profile is provided, then the builder will continue to suggest a color palette based on the colors used in the template that is being loaded.
The builder will remember recently selected colors and add them to your color palette. If the browser’s privacy settings allow it, the color picker history will be saved in the browser’s local storage.
If you want the color palette to be static such that recently selected colors are not included, then you can disable the history in your configuration.
The builder by default adds colors found in the template’s body section to the color palette.
If you want the color palette to only show the colors you pass in via the bee config document, then you must disable the base colors.
The default configuration returned by the system can be extended by using additional configuration objects such as:
Special links are links that your system generates dynamically when the message is sent, typically because they include the message ID, the recipient’s email, or some other variable. The most common one is probably the unsubscribe link.
The type
parameter will be used to group related links in the UI and simplify the user selection.
Technically, special links are passed to the application in the configuration file as follows:
and here’s an example of what the user will see in the builder UI, starting from the above code:
As mentioned above, when you initialize the application, in the configuration file you can submit both “merge tags” and “merge content”.
Really, they are the same thing: some syntax that your system will replace with some meaningful content at the time the email is sent. They differ in the way they are presented to the user.
Merge tags help dynamically insert text into a paragraph, such as the very common scenarios of “Dear {first_name}”.
Merge content, instead, helps the user insert special syntax as content element in other sections of the message that are not text, such a list of recommended products.
Currently it is not possible to group merge tags and merge contents as it is for special links.
Here is an example of adding mergeTags
and mergeContents
in the configuration file:
You can now use the Content Dialog feature to allow users to search for additional Merge Tags and Merge Content, beyond those passed in the configuration file.
Merge tags can be inserted into a text block by clicking on the “Merge tags” button in the expanded text block toolbar. The button is not shown if no merge tags were submitted in the configuration file.
Merge tags also become available to the user by pressing the @ key on the keyboard while editing a text block.
Here is an example: the user wants the date of the last order to be inserted after “[…] placing an order on …”, so he/she presses the @ key and selects “Last order date” from the list of merge tags found by the builder in the configuration file.
After inserting the merge tag, the text block now shows the placeholder for the last order date.
You can load Merge Tags in the builder when it is initialized by adding a mergeTags
node to the JSON configuration file. For example:
… or you can allow users to search and insert a merge tag by using the flexible Content Dialog feature. This is especially useful when the number of merge tags is large, and picking from a list would not provide an optimal user experience.
You can use a combination of both approaches, loading frequently used merge tags at the time the builder is initialized, and then allowing users to look for additional merge tags using Content Dialog.
The syntax used for Merge Tags is entirely up to you. Curly brackets, square brackets, ... you name it. The builder is agnostic to the syntax that your system employs for these dynamic fields. The same is true for Merge Contents.
Merge content differs from merge tags in that it allows the user to drag and drop instances of it as a content element available in the Content panel.
For example, let’s say you have a section of an email where you want to display some recommended products: Merge Content allows you to insert some syntax into the message that your application will replace with the recommended products at the time the email is sent.
When Merge Content elements are submitted to the builder in the configuration file, a new tile is displayed in the Content panel.
The user can drag and drop it into the message just like any other content element.
Once dropped in position, the settings panel will display the instances of merge content available for selection.
In the example below, the user wants to insert some banner ads into the email, using a service such as LiveIntent. An array of Merge Content elements were submitted to the builder in the configuration file, so the user has several banner ads to choose from (i.e. some syntax that will be replaced with HTML when the email is sent).
To create another instance of merge content, the user can either drag and drop it again from the Content tab, or duplicate the existing content element…
… choose another instance of merge content from the available selections…
… and then drag it elsewhere in the message.
Just like with Merge Tags, you can load Merge Content in the builder at the time it is initialized by adding a mergeContents
node to the JSON configuration file. For example:
… or you can allow users to search for additional instances of Merge Content by using the Content Dialog feature.
Here too, you can certainly use a combination of both approaches, loading frequently used Merge Content at the time the builder is initialized, and then allowing users to look for additional Merge Content using Content Dialog.
NOTE: if what you need for your users is a way to load a dynamic image into the message or page (e.g. a countdown clock), you don't need to use Merge Content. Beefree SDK can handle dynamic images with a feature that was created specifically for that task. See: letting your users add dynamic images.
Merge tags are meant to be placeholders that will be replaced at the time an email is sent, or the web content is generated for visitors.
You cannot use HTML code in the text strings passed to the builder because – if you do – it will be encoded and will not function correctly in the source code of the message. Of course, you can replace the tag with HTML code at the time of saving or sending the message.
Standard merge tags do not support sample placeholder content, for now. The syntax will be displayed in the builder as your users design the message or page.
If you want to provide a better experience when working with Merge tags, including using a friendly name instead of the syntax and generating sample content, we recommend to check out Smart merge tags.
Additionally, there are some other limitations that are specific to the Merge Content feature. Among them:
Users cannot see & edit the content: what’s in it, the style used, the layout, etc..
Not seeing it, they could select the wrong content from the list of available Merge Content.
The HTML might be created outside of Beefree SDK, which could lead to rendering issues when it’s inserted into the message.
Since the HTML is created elsewhere, and it’s not part of the document created by Beefree SDK, it must be managed separately.
Due to these additional limitations, we now recommend an alternative approach to Merge Content in order to handle dynamic content in Beefree SDK: utilizing Custom Rows with Merge Content & Display Conditions.
You can use the Content Dialog feature to introduce an interactive layer between the builder and your application, and through it extend Merge Tags, Merge Content, Special Links, and Display Conditions.
This feature is available on Beefree SDK paid plans only.
In Beefree SDK we introduced the idea that some content may be editable by some users and not others. For example, you may want the header and footer section of an email newsletter to be locked, so that it cannot be inadvertently modified when creating the latest version of your weekly news digest.
Internally, we’ve been calling this feature “Restricted editing”. Others refer to it as “locked regions”, “blocked content”, and more.
To allow for this, we created ways for the application hosting the builder to define user roles and set their permissions. Let’s take a look at how the feature works first and then show you how to configure your application to take advantage of it.
The user roles that you create (e.g. Brand Manager, Senior Editor, Junior Editor, etc.) can have different permissions. You can create as many or few user roles as you wish. The permissions that you can assign to them refer to:
Locking content (entire rows or specific content blocks)
Editing locked content
Using Display Conditions
Specifically, the permission settings that can be configured for each role are:
Can lock rows (if active, all other permissions are granted)
Can lock modules
Can edit locked rows
Can edit locked modules
Can select Display Conditions
Can edit Display Conditions
Can remove Display Conditions
For example, a Brand Manager all four permissions checked, whereas a Senior Editor might have editing access to rows and modules, but won’t be able to lock rows and modules. Let’s take a look at a few scenarios.
If the user has this permission, locking a row is very easy to do. That user will simply select the row they would like to lock and click on the lock/unlock radio button in the row properties panel.
If a user does not have the permissions needed to edit a locked row, they will see a friendly error when they attempt to select the row, notifying them that the row can’t be edited:
Likewise, they will not be able to drag & drop any content blocks on the locked row, as shown here:
You can restrict access to layout changes while granting access to content modifications by using user roles and permissions.
This allows you to give your users editing access to the content, while ensuring that the overall layout of the message is not altered, and that specific content blocks that should not be modified are left “as is”. This way, for example, a junior member of the marketing team could focus on updating text & images, without worrying about potentially modifying the structure of the message in an unwanted and/or unauthorized way.
Or, as shown in the example below, the same user could update social media icons and links in the footer of an email, without altering legal language and dynamic fields used in the same footer. That’s accomplished by setting us a social media module that’s editable (unlocked), but in a row that’s locked.
When users without the proper permissions try to edit, move or remove the row, they are told that they may not do so.
Similarly, if they try to edit any content is the row that has not been specifically unlocked, they are told that they are not able to do so. In this case, for instance, the user is not able to edit the merge tags used in the footer of the email.
However, when they click on the social media icons, they are able to edit it.
To accomplish the above, a user with higher permissions needs to:
Open the message in the builder
Lock a row
Unlock one or more specific pieces of content within the row.
Log into the Beefree SDK Console and click on Manage roles under Application configuration for the selected application:
In the Manage Roles section you’ll be able to create different user roles and set their permissions. For example, your user roles could be Brand Manager, Account Manager, Junior Editor, etc depending on your needs and nomenclature. For each user role you create, you can set and restrict editing permissions, such as the ability to lock or edit rows and content blocks, as you can see below:
Once you create your user roles you’ll be able to see them listed:
While Role Name is a friendly description of that user role, Role Hash is the parameter that identifies that particular role in Beefree SDK. It must be an alphanumeric string between 8 to 30 characters: it can contain letters and numbers, but cannot contain spaces or special characters (such as “-“, “_”, etc.). You will need to save these role hashes in your application, at the user level – or at the user role level, if you have the concept of “roles” in your application – so that you can retrieve them and pass them to the application when you initialize the builder for that specific user.
The property name is: roleHash
.
For user roles to become active in the builder , you will need to add this new property to your Beefree SDK configuration when you configure the builder for a specific user. You will pass:
roleHash: "roleSpecified"
for each of the user, depending on its role. For example, if the Role Hash for a “Junior Editor” is “juniorEditor”, the application configuration will include:
roleHash: "juniorEditor"
Please refer to configuring the builder for more details.
This section goes in more details about the various combinations of permissions. It might help you understand how to best put this feature to work in Beefree SDK with regard to locking & unlocking rows and content blocks.
First, we created some hypothetical roles by using all application combinations of the available user permissions at the row/content level.
admin
designer
designer2
copy
modules
rows
user
Then, we created a table with a number of possible “actions” and see which user role would have access to which actions. This allows you to map a certain combination of permissions (from above) to a specific task carried out in the Beefree SDK builder.
Lock/unlock a module
widget not provided
widget not provided
widget not provided
widget not provided
Lock/unlock a row
widget not provided
widget not provided
widget not provided
widget not provided
widget not provided
widget not provided
Add a module to locked row (the module is automatically locked)
can’t drop modules in locked rows
can’t drop modules in locked rows
can’t drop modules in locked rows
Move a locked module from an unlocked row to a locked one
can’t drop modules in locked rows
can’t drop modules in locked rows
module handler not provided
Move a locked module from a locked row to a locked one
module handler not provided
module handler not provided
module handler not provided
Move a locked module from a locked row to an unlocked one
module handler not provided
module handler not provided
module handler not provided
Move a locked module from an unlocked row to an unlocked one
module handler not provided
Move an unlocked module from an unlocked row to a locked one
can’t drop modules in locked rows
can’t drop modules in locked rows
can’t drop modules in locked rows
Move an unlocked module from a locked row to a locked one
module handler not provided
module handler not provided
module handler not provided
Move an unlocked module from a locked row to an unlocked one
module handler not provided
module handler not provided
module handler not provided
Move an unlocked module from an unlocked row to an unlocked one
Move a locked row
row handler not provided
row handler not provided
row handler not provided
Move an unlocked row
Delete/duplicate a locked module in locked row
show warning
show warning
show warning
Delete/duplicate an unlocked module in locked row
show warning
show warning
show warning
Delete/duplicate a locked module in unlocked row
show warning
Delete/duplicate an unlocked module in unlocked row
Delete/duplicate unlocked row containing locked modules
show error
show error
Delete/duplicate locked row
show warning
show warning
show warning
Change properties of a locked module
show warning
show warning
Change properties of an unlocked module
Change text of a text/button locked module
show warning
show warning
Change text of a text/button unlocked module
Add an image to a locked image module
show warning
show warning
Add an image to an unlocked image module
Change properties of a locked row
show warning
show warning
show warning
Change properties of an unlocked row
If you use Display Conditions in your builder application, then you can use additional user roles to control the access users have to creating and editing Display Conditions.
This feature is available on Beefree SDK paid plans only.
You can customize the list of fonts available in the editor’s text toolbar and the body settings panel.
This feature allows you (or users of your app) to:
Expand the list of available fonts, adding web fonts from popular services, such as Google fonts, font library.org or alike.
Reduce the list of fonts to a limited number of options, removing some or all our default fonts.
Unlike other premium features, fonts are part of the client-side configuration, so they can be defined each time the editor is started.
This flexible approach will help you use this feature in a variety of scenarios. A few example scenarios are the following:
You want your users to customize the list of fonts loaded in the builder when they edit designs. You can now create an interface in your app to do so, and instruct the editor accordingly (see below).
You have multiple levels of users, and you want “contributors” to only see a subset of approved fonts, while “editors” have access to a larger list.
You are a digital marketing agency, and you want to customize the list of fonts in the editor depending on the client/brand for which the email message is being designed.
For instance, in our hosted email design suite (Beefree), we leveraged this Beefree SDK feature to create a “Brand styles > Brand fonts” area where an agency or marketing team can select which fonts have been approved by that brand. Only the selected fonts will be loaded in the builder when an application is initialized. Here is a screenshot.
This object, passed as part of the builder configuration, tells the editor which fonts to load in any drop-down where a list of fonts is shown. It defines the availability of the default fonts and provides a list of additional, custom fonts.
In this example default fonts are loaded, and two new fonts are added: a web safe font (Comic Sans) and a Google hosted web font (Lobster).
Here is a more detailed description on how the editorFonts object is built:
showDefaultsFonts
This boolean parameter indicates if the entire list of default fonts is available or not. When the value is false, only the fonts added as custom fonts will be active in the editor.
customFonts
When the default font parameter is true, the custom fonts declared inside this object will be added to the list of default fonts: both are loaded into the editor. Otherwise, only custom fonts will be shown.
Each customFonts
element can have the following properties:
When we add a set of custom fonts, we can decide between system fonts and web fonts. Let’s see some details on what you need to know:
System fonts are installed on the operative systems and don’t need any external resource to work, so we can skip the url parameter.
Web fonts are hosted online and need to be loaded by the email client when the email is opened. Beefree SDK accepts only the CSS font embedding method, and the CSS file must be hosted in HTTPS protocol. You can use services like Google fonts, that provides host, font stacks and a well formatted CSS file.
We want the editor to work with only 2 fonts when creating a message, we want that only Lobster and Cabin fonts are available when editing this message:
In the following example, instead, we don’t want to add new fonts but restrict the default ones to our own selection:
Notice that if you want to change the default set of fonts, you need to disable them and use custom fonts to indicate the new set, including the URL parameter for web fonts.
This is the complete list of the default fonts in the application and its configuration, including the external URL for web fonts:
In this example, we want to add font weight options to our list:
We open a saved template that uses fonts that are not available:
System fonts will display normally in the editor and the text can be edited, but the font-family is not available in the font selector.
Web fonts will fallback to a system font. Text can be edited and the font-family is not available on the font selector.
We are able to save the message that already uses unavailable fonts.
This feature is available on Beefree SDK paid plans only.
When designing a message or a landing page with Beefree’s editors, there might be cases in which users of your application insert a merge tag, add a link to an image, or apply a conditional statement.
It’s all good until things scale up. For example…
What if you have 400 merge tags? You can feed an array of merge tags to the editor, but that’s not going to cut it.
What if it’s a 6,000 product database? How will they locate the right one? Special Links is not the right fit.
And what if a display condition needs to be built on-the-fly?
Since the Beefree builders are used in hundreds of applications, and since each of them is facing different user experience challenges like the examples mentioned above, we decided that this was really a case where one size does not fit all.
So we engineered a solution that puts you in control and provides a large amount of flexibility.
If your users want to insert a merge tag or a display condition, you control how that will happen. You can overlay a window on top of the editor, for example, and display a simple search box, a list of categories to browse, or a complex configurator to build an advanced conditional statement.
We call this feature Content Dialog.
Content Dialog allows you to build user interfaces for your users to locate & insert merge tags, links, conditional statements, and more. It lets you establish an interaction layer between the editor and your application (e.g. you show a pop-up window) that allows your users to locate/build/insert specific content (merge tags, links, conditional statements, etc.). And you’re in full control of the UI.
For example, imagine you want your customers to be able to quickly locate a link to a product page and assign that link to a button, image, or text. Content Dialog will let you build the right user experience.
Here is a visual example of what you could accomplish in that find a product link scenario.
The user experience in this interaction layer is entirely up to you. In the example above, the user clicked on “Find a product” (or alike) in the editor, and a modal window was shown, with a search box in it. Since you decide what the user experience will be like, you are fully in control of how users will select and insert:
a text placeholder (merge tag)
a dynamic link or a link to specific content (special link)
a markup placeholder (merge content)
a conditional statement (display conditions).
For each type of content, you can define the action that will be triggered in your application (e.g. display a modal window), and the text that will be displayed in the Beefree SDK editor’s UI to trigger that action (e.g. “Locate a merge tag”), keeping a consistent UX with other areas of your application.
Content Dialog introduces new call-to-actions in the editor UI.
Depending on the type of content, the call-to-action will be rendered as a button, a link, or a drop-down choice (see below a detailed list of UI changes).
The text for the action is defined by the host application, so you can use your own wording to provide a better experience.
An example of a possible workflow when the user clicks on a content dialog action:
The editor will start waiting mode (same as when the save action is triggered)
This mode prevents users from further editing and keeps the focus on the user selection
The waiting mode is interrupted if the host application cancels the action
The host application will display to the user a UI element to select or define a content item
When the selection is done, the host application closes the UI and passes it to the editor
The editor receives from the host application the selected content and exits waiting mode
The content is applied to the selected item
The same example applied to special links (link to a product) in a text selection:
The editor starts waiting mode
The host application displays an overlay that hides the editor and lists the categories of products to link. The user browses them to find the desired product and selects it.
The editor receives the link and exits waiting mode
The link is applied to the selected text
To set up content dialogs you will need to add the contentDialog
object to beeConfig
:
For rowDisplayConditions
, there is a third parameter called currentCondition
. Use this parameter to return a row's current display condition. This parameter returns an object with the following format:
Note: You do not have to name the parameter currentCondition
. You can use any name that works best for your application and workflow.
You can add all the dialogs, some of them or only one. Is up to your application to create them for all the users or a segment, as there are no related server-side settings, you can customize them for each editor start.
All the dialogs use the same pattern, but the returned object must match the element pattern (described in the following section).
Defines the text displayed in the editor UI.
Is a function with a Promise-like signature.
This function lets you use your own logic to retrieve the desired value.
Once the value is available, you must call the resolve(value)
function to pass it to the editor.
In case you want to cancel the operation, call the reject()
function.
A resolve or reject call is mandatory. If you miss this step, the editor will remain in waiting mode. Error management on the host application must call the reject function to unblock the editor.
The following code snippet displays and example of applying a link action.
The above code snippet is an example of how to apply a Special link.
When the user clicks on Add an Example Link, the URL http://www.example.com is applied to the selection (a button, an image or a text).
The waiting mode will not be perceived, and there is no cancel action.
The following code snippet displays and example of applying a link with a delay.
The setTimeout
function in the above code sample is used to delay the execution of the enclosed code. It delays the call to the resolve
function by 2000 milliseconds, or 2 seconds. This means that after initiating the special link dialog process, the application will wait for 2 seconds before adding and displaying the specified special link with the label 'external special link' and the URL 'http://www.example.com'.
The following code snippet displays and example of opening a dialog UI element.
In this example the openMySpecialLinkDialog()
should be replaced with a function that opens a modal window (or other element) of the host application, where the user can select or build a link.
The selection is then returned as the value of specialLink
to the resolve()
function.
A cancel action will trigger the reject()
function instead.
Values must use the same pattern used in the beeConfig
object.
The returned object is validated against the expected format.
If the validation fails, an error will be returned in the browser console:
E.g., Error getting content rowDisplayConditions, the item is malformed.
These errors will not trigger any visible notification in the UI.
Merge tags allow you to dynamically insert values into your content, such as user information or other variables. This section will guide you on how to configure merge tags in your host application. See the following section for sample code on setting up merge tags in your content dialog configuration.
Take the following steps to configure merge tags in your application:
Open your content dialog configuration file:
Locate the file where you configure your application's content dialog.
Add the contentDialog
object:
If it doesn't already exist, add the contentDialog
object into your configuration file.
Configure the mergeTags
property:
Inside the contentDialog
object, insert the mergeTags
property as shown below:
Define the handler function:
Within the handler
function, write your logic to dynamically insert values into the content.
Add a corresponding action in the text toolbar:
Ensure that the text toolbar includes an action for the merge tag element, allowing users to apply dynamic syntax easily.
Test your implementation:
Validate that the merge tags are working correctly within the UI, ensuring that the dynamic values are properly inserted.
You can add a new action, available in the text toolbar, and associated with the merge tag element:
A few of the most common use case for merge tags are the following:
Your application has a high number of placeholders and needs to provide a categorization or search form
Placeholder availability depends on options that the user can select while building the message
You want to display the same UI your users already know and use in your application
You need to separate merge tags from other text placeholders
The following code snippet defines an object with name
and value
parameters meant for handling placeholders in an application. The name
parameter, although not immediately displayed, is useful for later reference if the user selection is saved and reloaded. The value
parameter contains a text string with specific syntax. This is for inserting dynamic content. This setup is important for applications to manage many placeholders or custom text fields efficiently.
Important: The name parameter may be later displayed if the user selection is saved and loaded in beeConfig
on subsequent requests.
Special links are dynamic URLs embedded within emails to execute predefined actions, such as:
Unsubscribing a recipient: Allowing users to easily opt-out from mailing lists.
Loading a Web version of an email: Enabling recipients to view the email content in a browser.
Sending the email to a friend: Facilitating users to share the email with others.
A few end user benefits of using special links are the following:
User Convenience: Simplifies adding recurring URLs and actions to designs, which increases efficiency throughout the design creation process.
Consistent Implementation: Ensures URLs and actions are consistent and accessible across various platforms.
Important: Special links are inserted as code and treated as such during export, ensuring they populate in the HTML as-is. This prevents encoding issues and guarantees that the syntax is validated by the sending platform.
By incorporating special links, end users benefit from the ease of managing various links efficiently across diverse platforms.
This section will explain how to configure special links with steps and provide a code sample to help get you started.
Take the following steps to configure special links in your application:
Define a contentDialog
object within your configuration or settings file.
Add a specialLinks
property to the contentDialog
object.
Set the label
property to the desired name for your link, for example, 'Search a post link'.
Create a handler
function within the specialLinks
object where you will define the custom logic for handling the link.
Ensure this handler
function takes resolve
and reject
parameters to manage its behavior.
The following code snippet provides an example of how you can configure special links.
Links can be applied to different content types. When you define a link dialog action, it will be displayed in the text-toolbar, which is the same behavior for merge tags, as shown in the following image.
The following image shows an example action that applies to image or button content types.
A few of the most common use case for special links are the following:
Apply links to products or news using a categories pattern, a search form, or a visual browser
Apply special parameters or configuration to certain links with a wizard or form
You want to display the same UI your users already know and use in your application
In the following code sample, the parameters serve the following purposes:
type: Represents the type of link but will not be shown to the user directly.
label: Provides default text for the link if no specific text is selected.
link: Contains the URL that will be applied when creating the link, with the possibility of using placeholders.
Important: The type parameter will be displayed later if the user selection is saved and loaded in beeConfig
during subsequent requests.
Merge contents is a feature that allows you to consolidate multiple content sources into a unified display. This section will cover how to configure this feature and its most common use cases.
Access the configuration file of your application.
Locate the contentDialog
object within the file.
Add a mergeContents
property to the contentDialog
object.
Inside the mergeContents
property, set a label
with the description you want to appear, such as 'Set up a new product recommendation'.
Implement a handler
function that will process your custom logic. This function should accept two parameters: resolve
and reject
.
Insert your specific code inside the handler
function where indicated.
Your configuration should look like the following:
The content dialog adds a button to the merge content list as shown in the following image.
A few of the most common use case for merge contents are the following:
Set up the content and/or layout for a product recommendation
Set up the content and/or layout for a dynamic advertising
Set up the content and/or layout for another type of targeted content
Important: To display the Dynamic content tile in the contents panel, you must configure mergeContents in beeConfig with at least one predefined item.
In the following code snippet, the properties perform the following tasks:
name: This property specifies the display name of the content. It appears in the editor UI and helps users identify the content item within the messaging interface.
value: This property represents the actual content that will be injected into the HTML output, shown in the preview. The {{ syntax }}
is typically used for dynamic content insertion.
Display conditions allow you to control when specific content is shown based on predefined criteria. This section will cover how to configure display conditions in your application and common use cases.
To configure display conditions in your host application, take the following steps:
Define the contentDialog
Object: Start by defining an object called contentDialog
in your code. This object will hold the configuration for the display conditions.
Add the rowDisplayConditions
Property: Within the contentDialog
object, add a property named rowDisplayConditions
. This property will specify the conditions under which a particular row is displayed.
Set the label
Property: Inside the rowDisplayConditions
object, define a label
property. This property sets the text label for the display condition. For example, to set the label as "Open builder":
Define the handler
Function: Add a handler
property inside the rowDisplayConditions
object. This property is a function that determines the logic for your display conditions. It accepts two parameters: resolve
and reject
, which are typically used for promise handling.
Implement the Display Logic: Within the handler
function, implement the logic to determine whether the row should be displayed. Use the resolve
function to indicate the conditions are met, and the reject
function to indicate they are not.
Complete the Configuration: Make sure your configuration object is properly closed and integrated into your application. Ensure that all necessary conditions and logic are correctly defined within the handler
function.
Customize the logic within the handler
function to meet your specific needs.
A new button will be available in the display condition widget. In this example, the button says “Open builder”, which is the label
shown in the JSON configuration file shown above.
A few of the most common use case for display conditions are the following:
Display a condition builder or form to target a segment of recipients
Display a form to create a loop with the row dynamic contents, as product recommendations
The following code snippet configures a display condition with a specific label, description, and delimiters that define the start and end of the condition block in the template. This will be shown in the editor UI and inserted around the selected row based on the specified conditions.
Important: The type parameter may be later displayed if the user selection is saved and loaded in beeConfig
on subsequent requests.
In this example, a window is shown to users when they click on the button to open the builder.
The UI is entirely up to the hosting application. Here, the developer decided to offer some fields at the top where the Display Condition can be named and described, an area below it where parameters, values, and operators can be selected, and a preview on the right.
When users click on “Confirm”, the information is passed back to the editor and shown in the properties panel.
Of course, it can be edited in the editor like any other Display condition, if the user has the rights to do so.
Reference our Advanced Permissions documentation to learn more about managing the visibility of the Add Condition and Edit Condition buttons.
Custom rows allow you to import products or news using various patterns, set up predefined content layouts, and create dynamic sections for recommendations, codes, and advertisements. This section will discuss how to configure custom rows in your host application.
The following code snippet displays an example of how to configure custom row.
The content dialog adds a new item, using your text label, in the Rows drop-down:
A few of the most common use case for custom rows are the following:
Import a set of products or news, as custom rows, using a categories pattern, a search form, or a visual browser
Set up the row layout for a set of predefined contents
Set up rows with dynamic content to build dynamic sections that provide product recommendations, QR or bar codes, advertising content, etc.
The following code snippet configures a custom row with a specific name and value. This will be shown in the editor UI in reference to a specific custom row based on the specified conditions.
This response will:
Create a new drop-down choice with the provided name
Display the rows provided by the URL in the rows panel
Notice that in the rows list, names returned by the content dialog display as highlighted elements to give them further visibility over starting choices.
The content dialog can be used as many times as the user needs and, depending on the response, the behavior may change:
This overwrites the existing results, keeping the same name in the drop-down. This behavior perfectly matches our example above, where the host application returns “Your search results” every time the content dialog is resolved.
This creates a new drop-down choice, keeping the previous results as selectable elements. Previous results are available directly in the drop-down. Usage example:
Synced rows are rows that are used across multiple designs, ensuring consistency when updates to a row are made. This section will cover how to configure synced rows in your application.
The following code snippet displays an example of how to configure synced rows.
The label
, description
and notPermittedDescription
fields handle the wording related to the “Edit synced row” call-to-action/button. Here’s how and where they are used:
label
: Label related to the sidebar button that triggers the content dialog
description
: Description of the action on top of the button
notPermittedDescription
: Description of the action when the button is hidden from the dedicated advanced permission
Here’s an example of what label
and description
would look like:
And here’s an example of what notPermittedDescription
would look like:
Save rows refer to the functionality that allows users to save changes made to specific rows in a data table. This section will discuss how to configure the Save rows feature in your host application.
The following code snippet displays an example of how to configure save rows.
Unlike the rest of content dialog configurations, Save rows doesn’t use the label
parameter as the UI element is a save icon displayed on the selected row (and in the row’s properties panel):
The Save rows content dialog is a mandatory step in the Save rows workflow.
The resolve
function must return metadata for the selected row. The metadata section of the rows schema allows you to keep track of row-specific information.
The args
object in the handler function returns to the host application metadata already applied to the selected row.
The following code snippet configures a save row with a specific name and category. This will be shown in the editor UI in reference to a specific saved row.
This response will provide metadata that is added to the row in the asset (email, page, popup) before it’s provided through the Save Rows callback.
The row name is the only required metadata and it’s displayed as the row title in the Rows panel:
A string of plain text that identifies the row.
Displayed in the row card when the row is shown in the Rows panel.
Used for text searches within the Rows panel
Check the Saved rows metadata section for further details on recommended metadata.
Forms are interactive elements that allow users to input and submit data. This section will discuss how to configure forms to meet specific requirements in your host application.
The following code snippet displays an example of how to configure forms.
If you want to have total control on the forms that a Beefree SDK application displays and renders, you can use this forms Content Dialog rather than passing a single form to the Beefree SDK application.
The forms Content Dialog works the same way as the previous Content Dialog for save rows – but in this case, the resolve
function should return the structure for the desired form.
The args
object in the handler function returns to the host application the form object already applied. With this information, the application can decide what to display to the user (e.g., edit the current form, suggest a similar form, etc.).
To understand how this data is structured, refer to the form structure page on this website.
Custom attributes are user-defined metadata that can be added to links and images within an editor. This section will discuss how to configure custom attributes in your host application.
The following code snippet displays an example of how to configure custom attributes.
If your end users need to apply custom attributes to the links and images in their content, you can completely customize the user experience and workflow for adding those attributes with a Content Dialog that will take over the editor’s UI. The dialog will need to return the attribute to apply.
Custom video allows you to integrate and configure videos from custom sources other than standard platforms like YouTube and Vimeo. This section will discuss how to configure custom video for your host application.
The following code snippet displays an example of how to configure custom video.
It is possible to leverage the Content Dialog method to add videos from custom sources – other than YouTube and Vimeo.
You can use the addVideo
Content Dialog modal, which will take over the builder’s UI. The video will be added as a thumbnail in the content area.
The user must fill out the video URL from a custom source, the image used as a thumbnail, and an alt text/title by implementing a custom modal window (optional). When the user clicks on the video thumbnail, it will open videoSrc
in a new tab/window.
This feature is available on Beefree SDK and above. If you're on the Essentials plan, for free to try this and other Core-level features.
With Custom Attributes, your end users can easily append additional information to HTML tags in emails and web pages, at the same moment they are creating their content in Beefree SDK. These attributes can be applied to links, both in text blocks and buttons, and images, and they serve a variety of scenarios: personalization, segmentation, styling, accessibility, etc.
Custom attributes enable a wide array of use cases, depending on your application’s capabilities and your users’ needs. Here are a few examples:
flagging specific links so that user activity for those won’t be tracked (e.g. clicktracking="off”
in SendGrid);
handling internal statistical segmentation or reporting (e.g. data-reportingname="October_promo" data-reportingtags="promo,iphone"
);
adding conditions to a single content element (using an attribute such as condition="customer_exists"
);
embedding a single image by adding an attribute like embedded="true"
, processed when the message is sent;
adding custom CSS classes for custom CSS;
adding WAI-ARIA attributes for accessibility requirements.
The host application can provide the editor with a list of attributes that will be available to the user through the UI. How the attribute value is formatted impacts how the builder UI displays it and how the user interacts with it.
Custom attributes can be applied to:
Links in text blocks
Links in buttons
Images (including thumbnails generated by the Video block)
For images and buttons, these attributes will be visible in the editor sidebar, under the new “ATTRIBUTES” section.
For links in text blocks, they will be part of the dialog window for creating a link.
You can provide the editor with a list of attributes that will be available to the user through the UI. How the attribute value is formatted impacts how the builder UI displays it and how the user interacts with it.
Depending on how custom attributes are implemented, users may:
add a custom attribute from a list of attributes already defined, and specify the value of the attribute, if appliable:
from a predefined list
in a text input
defining a boolean property (yes/no, true/false, etc.)
add a “custom” custom attribute by manually specifying both name and value
open an additional interface, through a content dialog, where users have complete freedom on how to build custom attributes.
Regardless of how a custom attribute is added, it will be included in the a
or img
tag when HTML is generated for an email/page, like the segment attribute in this hyperlink:
Custom attributes are a client-side configuration that needs to be passed when initializing the editor. There are different shades of implementation complexity, based on the outcome you want to obtain. These approaches can be combined as preferred.
The easiest implementation is to just pass a simple configuration at startup:
With this setup, users can indicate a “Custom” custom attribute by manually specifying Name and Value. Please note that users must know exactly what they are doing, as there will be no guidance in the editor.
You can pass the necessary custom attributes in the initial configuration. Those attributes will be available in the interface, and the user will be able to specify the value for these attributes, if possible.
Let’s look through the attributes defined in the example above, and how they will look like in the builder.
The Deeplink
attribute has a single, predefined value, so when added in the builder it will look like this:
The Segment
attribute has two possible values, which can be selected by the user:
The Class
attribute has no defined value, so the user can enter anything in a text input:
Meta Tags are available for and .
With Meta Tags, you can now apply various tags to your HTML that can greatly benefit your SEO and accessibility needs.
These Meta Tags include:
Title
Description
Subject
Preheader
Language Attributes
For the Email Builder, Meta Tags promote improved deliverability performance. For the Page Builder, Meta Tags promote greater customization and improved search engine results.
The following image displays the Title and Description fields from within the page builder.
A page title, also known as a Title tag, is a short description of a webpage that appears at the top of a browser window and in SERPs (Search engine results page). This is an important element of an optimized SEO page, as it affects the page ranking in search engines. The title tag will be located within the <title> element of a page’s HTML output, and its value will be saved inside the JSON template.
Here is an example of what a Title Tag inside Beefree SDK’s HTML output might look like:
The description tag is located within the <meta> tag element of a page’s HTML, and it has a limit of 190 characters. The tag will be located within the <meta> element of the page’s HTML output, and its value will be saved inside the JSON template.
Here is an example of what a description tag inside Beefree SDK’s HTML output might look like:
The following code snippet is an example of what the Meta Tags will look like inside the JSON.
The following image displays the Subject and Preheader fields from within the email builder.
The subject field has a maximum of 190 characters. Here is an example of what a subject tag inside Beefree SDK’s HTML output might look like:
The preheader field has a maximum of 130 characters. Here is an example of what a preheader tag inside Beefree SDK’s HTML output might look like:
The following code snippet is an example of what the Meta Tags will look like inside the JSON.
The HTML lang attribute is used to identify the language of text content on the web. This information helps search engines return language-specific results, and it is also used by screen readers that switch language profiles to provide the correct accent and pronunciation for accessibility purposes.
When loading the builder, the host application can specify in the configuration a list of languages for their users to choose from (e.g. en-US), see the example below where the only option “Italian, it-IT” is provided. If there are no values provided via configuration file, a standard list of common languages will be provided.
Here is an example of what a language attribute inside Beefree SDK’s HTML output might look like:
This feature is available on Beefree SDK and above. If you're on the Essentials plan, for free to try this and other Core-level features.
Display conditions allow you to change the content that is shown to a recipient of an email depending on who the recipient is.
Your users will have the ability to pick a condition (or write one from scratch if they are technically savvy), apply it to a row, and thus show different content based on who the recipient (or viewer) is.
The feature provides a number of benefits, including:
Display conditions allow anyone that is using the builder to easily create personalized messages without writing a line of code.
Use whatever syntax your application understands. The feature is language agnostic: it can be used with whatever syntax matches your tech stack. Does your sending engine understand the Liquid markup? Then you can use Liquid. Does it use a proprietary templating language? No problem.
Restrict access to some of the functionality based on user roles. For example, some users may be able to edit the syntax of the conditional statements, while others may not. Use this flexibility to simplify the UI or promote upselling.
As the application hosting the builder, you can now pass an array of conditions.
Those conditions become available for users of the editor to select, assuming the feature is turned on and the user has permissions to apply a condition to a row.
They will do so by browsing through categories or searching by keyword. For example…
The condition that they pick is applied to the row and displayed when the row is selected.
It can be changed (i.e. the user decides to apply another condition) or edited (if the user has the technical skills to do so, and its user role has been granted those permissions).
When the Preview feature is accessed, users can now simulate what recipients in a certain segment will see by toggling Display conditions on and off.
When active, the feature is available to all users by default. You can manage who can see and/or do what by leveraging user roles and permissions.
When the feature is ON, new permissions are available for you to configure when you create or edit a Role.
A basic set up allows you to have 3 user levels:
Can only view & preview
None of the above options are selected
No widget will be shown unless the loaded message has display conditions assigned to one or more rows
If conditions are applied:
They are shown as ready-only
They can be applied in the Preview
Can only select
Only Can select conditions option is selected in the role settings (remove will be automatically selected too)
The widget shows and the user can select and apply any of the conditions specified in the editor configuration
The user cannot add a new condition
The user cannot edit a selected condition
Full control
All permissions are selected
The user can select and edit conditions (if provided) or add a new condition
Note: if there are no Display conditions passed in the configuration, and the user has the rights to access the feature, the editor will only show the Add condition action, which allows users to apply a new condition to a row by manually adding the condition’s syntax.
It’s easy to identify a row to which a display condition has been applied. A bifurcation icon is added to the row’s “Structure” tag, which is shown as you mouse over the row. Here’s an example:
When a default Display condition is edited – by a user that has permissions to do so – it becomes a custom condition. Custom conditions are easy to recognize because:
A blue dot is added next to the condition’s name
The “Change condition” button is no longer available: a custom condition can only be removed
The cancel icon is replaced by a trash button because an edited condition, once remove, is lost: it cannot be re-added.
Why these different behaviors for custom conditions? Because Beefree SDK does not save them to the configuration (you passed that configuration to the application: we don’t have access to the repository where you save that information). So, custom conditions do not exist in the array of conditions that the user can search and/or browse.
Conditional syntax and row content are isolated from each other in the HTML generated by Beefree SDK, so your system can delete, repeat or change elements inside the row without impacting other parts of the message. For example, the HTML of a row might look like this:
Here is an example of a custom builder of Display Conditions.
The Commenting feature is available for .
With Commenting, teams using your application can collaborate asynchronously on the same email, page or popup, in order to get their work done more quickly and reach approval for going live more efficiently.
When Commenting is enabled, your end-users (or contributors, as we’ll call them in this context) can:
Add a new comment in any content block or row, so that the context of the discussion is always visible;
Reply to an existing comment and start a thread;
Mark existing threads as resolved, and reopen solved threads if necessary.
Copy the text of a comment, and paste it back to the content area
Preview comments by hovering over the comment icon
Automatically highlight the row where a thread is posted
Receive a notification straight in the builder when a new comment is added during a co-editing session (Superpowers users only).
With Commenting, you enable asynchronous, visual collaboration when multiple collaborators are creating, editing, and reviewing content in the Beefree builders. This collaborative feature can prove extremely beneficial in different contexts, regardless if contributors are in the same team, in separate teams, or even in different companies (e.g. digital marketing agencies collaborating with their clients):
have a single source of truth for feedback and requests on the content created with the builders;
cut time-to-publish, reducing back and forth conversations, both online and offline;
get sign-off for going live for email and web campaigns more efficiently.
Commenting – like most other features – is made available to Beefree SDK customers in an OFF state by default, and must be activated in the Beefree SDK Console.
To do so:
Click Details next to the application you want to configure
We recommend you first familiarize with Commenting in a Development or QA application
Click view more under Application configuration.
Toggle Enable commenting ON and click the Save button to activate Commenting for the application.
To activate Commenting when launching your Beefree application, you will need to pass a username
, userHandle
, and a userColor
in the configuration parameters. See this example:
When opening an email, a landing page or a popup, a contributor can add a new comment to a content block or a row by clicking the “Balloon” icon, available in two spots:
in the row or block outline, inside the editing stage
in the header of the Row properties or Content properties
Clicking one of these two icons will activate the commenting panel, which takes over the editor sidebar. From there, the user can insert a new comment. After the first comment, another contributor can start a thread by adding a second comment.
If you have implemented mentions, users can type @ to bring up a list of contributors and tag them in the comment. If the user starts typing, the list will be filtered If you’ve built a notification system around Commenting, you can use this piece of information to trigger a notification towards the mentioned person.
If you added a Content dialog for mentions, the action will be triggered by the button at the end of the list. You will define the CTA for this button as part of the Content dialog configuration (in this case, “Send an invite”).
If there has already been some activity, the editing stage shows whether a content block or row has any comments by displaying a small comment icon. The sidebar instead indicates the number of existing comments for the selected row or content block, three in this case.
Activating the Commenting panel will bring up the thread. In this case, it will show the three comments.
Existing comments can be edited or deleted by the contributor that added them. Contributors may also resolve comments when they have reached a consensus and completed any pending task.
Improved accessibility to in-line threads. Hover the mouse over the comment icon to see a preview of the last comment added.
Clicking on < All comments in the top section will bring up a list of all comment threads, indicating which ones have been resolved and which ones are still open. Contributors can search inside comments and filter out solved threads, or threads that were part of deleted content. Deleted and hidden comments will be filtered automatically.
To go back to the editor sidebar, contributors can close the Commenting panel by clicking the X icon in the upper right, or they can just click on another row or content block in the stage.
Quickly reopen resolved threads by adding a new comment, expand threads with a click, and show a comment thread preview straight from the content area.
Suggest edits in seconds, and save time with the copy/paste feature. Copy text from the comment body and paste it directly into the content area.
With the Reviewer role, you can now allow users to collaborate on your projects without changing the design. This role helps provide peace of mind by allowing inexperienced users to work with the team on their designs, without fear of accidentally changing it.
In short, this new role has the following characteristics:
Can’t apply changes to the message
Can add comments and start threads
Can edit their own comments
Can view other comments
This new role can be easily enabled by passing the following parameter in your configuration:
Once you turn on the feature in the Beefree SDK Console, you may want to disable Commenting for some customers. You can do so via the client-side configuration document that you feed to your Beefree application when initializing the editor.
Why? Because you may decide to make the feature available to customers of your application:
depending on the subscription plan that they are on (i.e. you could push users to a higher plan based on the ability to use Commenting);
depending on the purchase of an optional feature (same);
only if they are “beta” customers, so they see it while keeping it hidden from the rest of your users.
Here’s how to do so:
Enable Commenting in the Beefree SDK console, as mentioned above.
Add the configuration parameter commenting to the beeConfig document
Set it to false for all users that cannot comment.
Here is a simple example:
You can build a notification system around commenting by triggering a callback for events in the Commenting layer. When these events happen, the Beefree system triggers the onComment
callback.
You can react to that callback by taking the information provided in it (e.g. the user that created the comment, the text of the comment, any mentioned user, date & time of the comment, etc.) and send notifications.
You are free to define:
which events will trigger a notification
how it is sent (e.g. Email, In-app, Slack, etc.)
what exactly it says
Again, remember that the Beefree platform only triggers the callback, and it’s up to you to react, if you want. Below you can find the technical details on the comments schema and the onComment
callback.
Define an array to hold the list of mentioned users in the comment payload.
Loop through the comment payload and add any strings matching a regex to the array
Compare each value in the array with the ‘handle’ property of each user (as defined by the host application), to grab the active users
Loop through your array and pull the respective email address for the handle matches (for use in notifications)
Send the notification through email (via ajax), slack, etc… (you decide and implement how to send the notification)
The following JSON is saved as part of the template:
You may want to save multiple copies of a template, e.g. to create a history/revision or a draft feature.
In such cases, you may decide to store the comments in a database, and add the schema back to the template when it’s loaded. Alternatively, you can keep the comments inside the template, and it will become a static part of the history.
Comments can also be added dynamically, but it’s an advanced task, which requires matching the comment schema to the target content by its “elementId”.
When a thread or comment changes, the Beefree system triggers the onComment
callback. The callback returns the following details:
JSON contains all the details on the change
JSON array of the entire comments schema, as described in the previous section.
JSON contains the contributors
array with all users in a thread.
NEW_COMMENT
COMMENT_THREAD_RESOLVED
COMMENT_THREAD_REOPENED
COMMENT_EDITED
COMMENT_DELETED
JSON contains all the details of the change
You can activate a mention dialog for comments by adding a data source to the Beefree application configuration. You can use the “Hooks” data source method to fetch data from your application and pass it to the Beefree system in real-time.
To configure a hook data source, define the hooks
section in your bee config and implement the getMentions
method.
You can also extend the default mention dialog via Content Dialog. For example, you can enable end-users to to invite an external user not available in the data source.
To configure a hook content dialog, define the contentDialog
section in your Beefree application configuration and implement the getMention
method.
You can generate a link to a specific comment, which can be used to notify the user. Common use cases include sending a link via email, Slack, API, or via in-app messaging. To implement this action use the onComment
callback combined with a new instance method called showComment
.
The onComment
callback contains the comment’s id and a new section called “mentions” containing an array of mentioned users’ uid values.
With the uid
, your application can look-up the user’s contact details. The Beefree platform does not track any sensitive information, such as user emails!
Similarly, since mentions can trigger events and the uid
can generate notifications, you can match uid
to userHandle
.
Next, using the comment’s id, your app can generate a link back to the email containing the comment. The new showComment
instance method can be invoked from Beefree’s onLoad
callback to send the user directly to the comment as soon as the editor is fully loaded and ready.
Note: In the sample below, getParameterByName
is a function that takes the commentId
from the browser’s URL query string.
You can totally customize the UX of adding attributes by invoking a that will take over the editor’s UI. The dialog will need to return the attribute that needs to be applied.
Please note that the Display conditions are disabled by default. You can turn this feature on by enabling it under the . You must be on a paid plan (Core subscription and above) to enable this feature.
Reference our to learn more about managing the visibility of the Add Condition and Edit Condition buttons.
You can extend this feature and allow users of the editor to build their own Display Conditions, on the fly, using a UI that you control. It’s part of the functionality. This is an advanced feature that requires some development on the side of the hosting application, but that provides fantastic flexibility.
Learn more about
If you subscribed to a Superpowers plan, and have enabled, your users will never lose a new comment again with the new notification system. Users will receive real-time notifications whenever a new comment is added to the document straight in the builder.
By clicking on the notification, they will be able to quickly open the comment, and highlight the element where the conversation is taking place. The toast notification can be styled with to match your application look-and-feel.
If you want to learn how to implement co-editing in your application, check the related documentation article .
We’ve put together a that illustrates how to send email notifications, triggered by a mention in a comment. This code shows how to:
name
This string will be shown in the font dropdown list. You can use the term you prefer and we suggest the usage of common font names, but you can go creative and use semantic names that fit on your application. Long strings may impact the interface, so we recommend to keep it short. The characters { } [ ] : ” / \ | ? * are invalid.
fontFamily
Describes the CSS font stack that will be applied to the final HTML. Is important that you provide at least one fallback font to ensure that the text is not displayed using an unwanted font family. Is important that you use single quote marks with the font names instead of double quotation marks to maintain a correct JSON syntax.
url
This parameter is used only when we work with web fonts. Is important that the URL points to a CSS file with the @font-face properties, and not directly to the font files. To work, the CSS must be hosted in HTTPS.
fontWeight
Adds a new option in the dropdown of the content block’s settings for title, button, paragraph, and list blocks (e.g. 100: Thin). If not defined, only Regular (400) and Bold (700) will be available.
Special Links and Merge Tags
Content Dialog
Custom Color Palette
Font management
Roles and Permissions
Smart Merge Tags
Commenting
Custom Attributes
Meta Tags
Custom Languages
Display Conditions
Advanced Permissions
Custom File Picker
Custom Headers
This feature is available on Beefree SDK Superpowers plan and above. If you're on the Core or Essentials plan, upgrade a development application for free to try this and other Superpowers-level features.
With Advanced permissions, you can tailor permissions for users of your Beefree application by hiding or locking UI elements related to:
content tiles
content settings
layout settings
row & content actions (clone, delete, drag, save)
basically anything in the editor!
These advanced permissions grant total customization of the experience you want to present. Since you set them in the configuration parameters passed to your Beefree app after you’ve initialized it, they could be different each time the editor starts, and have different setups for different users.
The absolute flexibility of these permissions makes it easy to address specific needs, not achievable with the Roles and Permissions feature that is available in the Beefree SDK Console.
You can create roles that can act only on a content type. For example, you may want a “copywriter” role for people in an organization that only need to touch copy for editing or translation purposes. To do so, you can:
hide any action that doesn’t involve working on the copy of an email or page.
limit style options for the text itself, by
locking/hiding the side tab;
hiding specific settings in the text toolbar.
You can limit how users upload and manage images and files inside Beefree SDK; for example, you want some users – e.g., external collaborators – to select pre-approved images and files uploaded by “admin” users. You can do so by:
disabling drag-and-drop of images onto the stage;
limit actions in the file manager (either the built-in one or your custom file picker) by disabling actions like upload, import, and create a folder.
Another interesting case for using advanced permissions is the possibility to set a maximum size for uploads, per user. The maximum size set per user must not exceed the custom limitation size set on the Activate Custom Limitation on File Manager. The default limit is 20 Mb unless otherwise stated. When this permission is configured, the system will check if a file exceeds the set size before uploading it; if so, Beefree SDK will return an error message, which you may customize using Custom languages.
When customers of your applications are structured businesses, typically with a headquarter and a locally-deployed organization (e.g., Real Estate, Travel, Retail), their administrators can create custom, secondary roles to match any internal policy they might have. In this scenario, admins typically want to reduce disruptions of centrally-deployed templates for external communication, while allowing a specific degree of freedom.
Initialize different versions of the editor
By combining multiple permissions, you can load Beefree SDK with radically different experiences, based on the user that starts it. For example:
a “stripped-down” version of the content builder for lower-level subscribers;
a “simplified” version of the builder for new users of an account.
To set up the advanced permissions, you will need to add the advancedPermissions
object to beeConfig.
Note: Click on the arrow next to the section title in the following section to expand the following sections and reference its corresponding content.
The following table provides the name, data type, description, and an example value for the first-level fields for advancedPermissions
.
uid
string
Unique identifier for the CMS user (mandatory).
'CmsUserName'
container
string
HTML container element ID for embedding Beefree SDK (mandatory).
'bee-plugin-container'
advanced permissions
object
Contains settings for content elements, rows, settings, and tabs configurations.
See configuration object for details.
components
object
Specifies available components like file picker and link types.
{ filePicker: {...}, linkTypes: {...} }
rowAddOn
object
Settings for custom row add-ons, such as custom behaviors.
{ customRowAddonHandle: {...} }
workspace
object
Defines workspace settings, such as stage toggle and history buttons visibility.
{ stageToggle: {...}, historyButtons: true }
You can add all the permissions, some of them, or just one. It is up to your application to create them for all users or a segment, as there are no related server-side settings. You may have a different setup each time the editor starts.
All the permissions use a similar pattern, but the object must match the content schema for the type of content (described in the following section).
Each content type below contains a parameter for “behaviors” and “properties”. The behaviors control what someone can, or can’t, do. The properties parameter is an array of sidebar property widgets (e.g., the width slider), and each widget has its default permissions.
All sidebar property widgets (e.g. width slider, alignment, color, etc.) accept the following basic permissions:
locked
boolean
true or false
show
boolean
true or false
Let’s look at an example of these permissions applied to an image module. The following example will hide the image width property widget and lock the text alignment widget. We’ll cover more of the available settings below.
All contents and rows (e.g. image module, video module, stage row, etc.) accept the following basic behaviors:
canSelect
boolean
true or false
Can select a row or module to edit its properties
canAdd
boolean
true or false
Can drag and drop the content tile or row onto the stage
canViewSidebar
boolean
true or false
Can view the content in the sidebar
canClone
boolean
true or false
Can clone a content or row on the stage
canMove
boolean
true or false
Can drag content to another location on the stage
canDelete
boolean
true or false
Can remove the content or row from the stage
canResetMobile
boolean
true or false
Can reset mobile style for content properties that make use of it
The components
object lets you control the behavior and permissions for tools like file pickers and link types within the editor. You can define what actions users can take, such as uploading or deleting files, and specify which link types (e.g., web addresses, emails) are available. This section provides more information on the component object within advanced permissions.
The following code provides an example of the filePicker
object.
The following code provides an example of the linkTypes
object.
The rows
object in Beefree SDK allows you to manage the behavior and appearance of rows in the editor. You can control what users can do with rows, such as adding, deleting, or moving them. Additionally, you can set permissions for properties like background color, stacking behavior on mobile, and visibility settings. Configuring the rows
object ensures users can work with rows in a controlled way, customizing their content without altering crucial layout elements.
Hosted Saved Rows includes advanced permissions to control how rows and categories are accessed and managed. These permissions allow you to define user capabilities, such as editing or deleting rows.
canDeleteHostedRow
: Allows or prevents deleting hosted rows.
canEditHostedRow
: Enables or disables editing of hosted rows.
canManageHostedRowCategory
: Controls whether end users can manage row categories.
canAddHostedRowCategory
: Determines if end users can add new categories.
If both canDeleteHostedRow
and canEditHostedRow
are set to false
, the row menu will be hidden.
If both canManageHostedRowCategory
and canAddHostedRowCategory
are set to false
, the category management menu will be hidden.
The following configuration displays an example of the rows
object inside of advancedPermissions
:
The following code demonstrates how to specify behavior settings for individual row addons. A custom row addon can have its behaviors set independently from the global row settings.
The columns
object in the Beefree SDK lets you control the behavior and permissions for columns within the editor. You can define what users can do with columns, such as adding, selecting, moving, or deleting them. You can also set properties like column spacing and border radius. Configuring the columns
object ensures that users can manage column layouts effectively, while maintaining control over the design and structure of the content.
The tabs
object in the Beefree SDK allows you to manage the visibility and permissions of different tabs within the editor, such as the Rows, Content, and Settings tabs. You can control which tabs users can access and whether they can interact with them. By configuring the tabs
object, you streamline the editor’s interface, ensuring users have access to only the relevant tabs they need for editing while maintaining control over what they can modify.
The settings
object in the Beefree SDK allows you to control various design-related settings within the editor, such as content area width, background colors, and default font styles. You can define which settings users can view or modify, such as enabling or locking background images or link colors. By configuring the settings
object, you ensure that users can customize specific design elements while maintaining overall control over the layout and style of the content.
The content
object in the Beefree SDK controls the behavior and permissions for different types of content blocks, such as text, images, buttons, and more. You can specify what users can do with each content type, such as adding, editing, or selecting them, and set properties like alignment, padding, and visibility. By configuring the content
object, you allow users to interact with content blocks while maintaining control over how each element can be modified within the design.
You should use the Icon object to set advanced permissions when you need granular control over the display and behavior of icon elements. This allows you to lock certain properties, such as the visibility and font weight, ensuring consistency across different devices and user interactions. Additionally, setting these permissions helps in maintaining a cohesive design by managing how icons respond to mobile and AMP environments.
In the given icon code, the structure is defined using objects, properties, and parameters to represent a detailed configuration. The main object, icons
, encompasses two primary properties: behaviors
and properties
, each of which is an object itself. The behaviors
object contains a property canResetMobile
with a boolean parameter set to false
, indicating a specific behavior setting. The properties
object holds various properties such as icons
, fontWeight
, align
, and more, each representing different characteristics and settings for the icons. Each of these properties has parameters assigned to them; for instance, the icons
property has show
and locked
parameters set to true
, determining the visibility and lock status of the icons. This nested structure using objects and properties with defined parameters represent the configuration settings in the code.
The table below outlines the configuration elements, their data types, descriptions, and default values for the behaviors object used in the icon configuration.
canResetMobile
boolean
Indicates whether icons can reset to default settings on mobile devices.
false
The table below outlines the configuration elements, their data types, descriptions, and default values for the properties object used in the icon configuration.
icons
object
show
boolean
Determines if the icons are visible.
true
locked
boolean
Indicates if the icons' visibility setting is locked.
true
fontWeight
object
show
boolean
Determines if the font weight option is visible for icons.
true
locked
boolean
Indicates if the font weight option is locked.
false
align
object
Aligns icons within their container.
NA
fontFamily
object
Sets the font family for icon labels.
NA
fontSize
object
Sets the font size for icon labels.
NA
textColor
object
Sets the text color for icon labels.
NA
iconSize
object
Sets the size of the icons.
NA
itemsSpacing
object
Sets the spacing between multiple icons.
NA
iconSpacing
object
Sets the spacing around individual icons.
NA
padding
object
Sets the padding around icons.
NA
hideOnMobile
object
Hides icons on mobile devices.
NA
hideOnAmp
object
Hides icons on AMP-format pages.
NA
id
object
Sets a unique identifier for icons.
NA
letterSpacing
object
Sets the space between letters in icon labels.
NA
In this section, we will explore how to assign advanced permissions and behaviors for various AddOn types, specifically focusing on how to customize permissions for Custom AddOns and Row AddOns. These permissions can override default settings to provide granular control. For instance, an image addon can have specific permissions different from the default image block permissions.
To successfully use this feature, follow these steps:
Identify the AddOn ID: Obtain the unique ID of the addon you wish to assign permissions to.
Define Custom Permissions: Based on the type of addon, assign relevant permissions in your configuration file.
Override Default Permissions: Specify advanced permissions for the addon, ensuring they override the default ones if needed.
Set Specific Behaviors: For row addons, include permissions for individual modules like image blocks inside the row addon.
Apply Global Restrictions: Optionally, set global restrictions for all mixed and row content addons for consistent behavior.
By following these steps, you can effectively manage and customize addon permissions.
The following code provides an example of the different content modules and the addons-id
.
The following code shows an example AddOn with the canViewSidebar
behavior set to true
.
The following code defines specific permissions and behaviors for different modules within a Row AddOn.
You can choose to display or hide the "Add Condition" and "Edit Condition" buttons when using the Content Dialog with Display Conditions.
The following code shows an example config for how you can display or hide these buttons using advanced permissions.
The following code snippet provides an example configuration for integrating the AI Writing Assistant AddOn with advanced permission settings for managing access and permissions to Brand Tones:
We’ve put together a few JSON templates of custom roles created with Advanced permissions, so you can get started experimenting with this powerful feature.
You can find them in our GitHub account.
This feature is available on Beefree SDK Superpowers plan and above. If you're on the Core or Essentials plan, upgrade a development application for free to try this and other Superpowers-level features.
This feature allows the host application to pass custom headers when it triggers a call to their services. The custom headers are added to FSP calls and to Custom Rows calls.
For example, this could be useful for the security teams of , which would like to pass a JWT (JSON Web Token) when the user, through the file manager, triggers a call to their Custom File System Provider API.
It may be also be used to protect application or customer-hosted content delivered to the editor, such as custom rows or other host app-specific content. The extra token helps the host application to apply an authentication layer to the contacted endpoints.
To activate this feature, the host application must add a specific element to the Configuration object:
Please note that all custom headers will be prefixed with “X-BEE-“ identifier. For instance, in the example above, the header will be sent to the host app as X-BEE-Authorization
.
Please note that custom headers must be whitelisted by our team before using them. Please open a support ticket via the Beefree SDK Console if you’re planning to use this feature.
You can choose one of 20+ languages for the visual builder's UI when initializing the builder. If you want to use custom language strings, however, you will need to use a Custom Language. This feature is available on Beefree SDK Core plan and above. If you're on the Essentials plan, upgrade a development application for free to try this and other Core-level features.
You may now override the default Beefree SDK language file by providing a URL to your own translations. This is an advanced feature and will replace all languages used by the editor with the languages defined in the custom file.
The easiest method to override specific text labels is to pass a JSON object in your beeConfig
, which contains the segments of the language file you want to override.
The following code defines a translation object where the title for "bee-settings-details" is set to "New Email Details" specifically for the "email" field.
Check out our Github repository for starter language templates in all supported languages.
This feature is available on Beefree SDK Superpowers plan and above. If you're on the Core or Essentials plan, upgrade a development application for free to try this and other Superpowers-level features.
This feature allows you to have your own file picker for choosing files (images) in Beefree SDK's Editor, to make its integration in your platform look even more seamless. It leverages Beefree SDK’s Content Dialog feature. To set it up you will need to add the corresponding entry to the configuration object:
The handler
function lets you use your own logic to retrieve the desired value, and it has a Promise-like signature.
If data from Beefree SDK is available, it will be sent in the args
parameter (see below). Once the value is available, you must call the resolve(value)
function to pass it to the editor. In case you want to cancel the operation, call the reject()
function.
Please note that a resolve
or reject
call is mandatory. If you miss this step, the editor will remain in waiting mode – and the error management on the host application must call the reject()
function to unblock the editor.
The args
parameter is where the File Picker’s Content Dialog will receive additional data.
Images dragged onto an image block or edited via the “apply effects and more” button will be passed to the image storage per your app’s file storage settings. To prevent images from passing through Beefree SDK’s file storage, the file upload can be disabled via advanced permissions.
Values must use the same pattern used in the configuration object: the returned object is validated against the expected format. If the validation fails, an error will be returned to the browser console, eg: Error getting content filePicker value, the item is malformed
The following is the most basic example, which returns an image URL immediately after clicking the “Browse” button. This example does not open a file picker.
In a real-world scenario, the host application would display a file picker UI and let the user search for and locate the file before finally returning the file’s location (URL) to Beefree SDK:
The following is a list of all modules that are sent as part of the args parameter:
This feature is available on Beefree SDK Core plan and above. If you're on the Essentials plan, upgrade a development application for free to try this and other Core-level features.
Smart merge tags provide a better way for your customers to leverage personalization when creating content with Beefree SDK.
With Smart merge tags, users can:
quickly identify merge tags through a specific highlighting
see human-friendly names instead of the raw syntax – e.g., Customer Name instead of {%customer.name%}.
select, replace, and style merge tags with just one click
get sample content for each merge tag, both during editing and preview.
After enabling Smart merge tags, the builder will:
highlight merge tags with a dotted border
display the tag name you passed instead of the raw syntax
When users click on a tag, its border will become solid to signify that it has been selected. After selection, users can style, replace, or delete the merge tag with just one click.
Smart merge tags are easier to identify inside the content you’ve created and will save users tons of time. Furthermore, hiding the syntax will make it impossible for a user to break it while interacting with the overall text element.
On top of this, you can pass sample content for each merge tag, so that users can see an example of the data that will take the place of the merge tags when the web content is rendered:
Smart merge tags are disabled by default. If your application doesn’t have Smart merge tags, you need to activate it. It takes just a few clicks:
Click Details next to the application you want to configure
We recommend you first familiarize yourself with this feature under a DEV or QA application
Click view more under Application configuration.
Under the Services section, toggle Enable Smart merge tags ON and click the Save button.
Notice that, at this point, you will be prompted to enable the merge tag preview in the toolbar. You can skip this option when your integration is not using the standard toolbar or you’re not passing sample content for your merge tags.
After enabling Smart merge tags from your developer account, you need to apply a minor change to the merge tags’ initial configuration.
The optional previewValue
parameter is used to pass to the editor a sample content (text string) for every merge tag.
The value of this new parameter will replace the merge tag in the editor preview, meaning that there’s no need to build a custom preview to display the final result of an email or landing page with rich personalization strings.
Sample content strings are not limited to the preview, but can be displayed in the editor’s stage as mentioned above.
The way to do this depends on how your integration manages the toolbar options.
In this case, you can simply enable the option “Show ‘Merge tag preview’ in toolbar” mentioned above.
When this option is active, the toolbar displays a new action to the user:
The option works as a toggle that alternates between displaying the previewValue
and the name parameter inside the merge tag UI.
As with all the actions available in the toolbar, we provide methods to control this option from your own UI:
Use this method to replicate the behavior described for the standard toolbar.
sidebar.link
buttonModule.link
imageModule.link
iconsModule.link
menuModule.link
iconsModule.src
socialModule.src
textModule.link
imageModule.src
titleModule.link
row.backgroundImage
backgroundVideo.src
toolbar.specialLink
sidebar.specialLink