
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@mailupinc/bee-plugin
Advanced tools

A simple module to use the Beefree SDK
Choose a reliable, easy-to-integrate multi-content type digital platform you can build on. Beefree SDK is more than an embeddable visual builder with a great drag-and-drop user experience. It’s a reliable, highly customizable email, landing page & popup builder.
Go from proof-of-concept to production in days, not months. Beefree SDK can be highly customized in how it looks, what it does, and how it interacts with your application. Deliver your business exactly what it needs with a small development effort.
You can embed it into your application!
Visit our developer documentation [https://docs.beefree.io/]
It's free to use on 'https://beefree.io': you don't even need to create an account of any kind.
npm install or yarn install(if you have it installed) in the folder cloned.env.sample file into .envnpm start or yarn starthttp://localhost:8080.npm install --save @mailupinc/bee-plugin
or
yarn add @mailupinc/bee-plugin
You need to be authorized to start using the editor: beefree help documentation portal has a nice post explaining how to do it
It's not really raccomended to do it client side but it's possible with the module, just call getToken.
Pass your credential on getToken method and start the plugin in the returning promise. Example below:
import BeePlugin as BeefreeSDK from '@mailupinc/bee-plugin'
//Put your credentials in the .env file
const clientId = process.env.CLIENT_ID
const clientSecret = process.env.CLIENT_SECRET
const beeConfig = {...}
const template = {...}
const beeTest = new BeefreeSDK(token, authConfiguration)
beeTest.getToken(clientId, clientSecret)
.then(() => beeTest.start(beeConfig, template))
Initialize the BEE instance with a server side generated token
import BeePlugin as BeefreeSDK from '@mailupinc/bee-plugin'
const authConf = {...}
const beeConfig = {...}
const template = {...}
// You can add your personal configuration, if you omit some properties, the builder will use its default configuration
const authConf = {
authUrl: process.env.YOUR_AUTH_URL,
beePluginUrl: process.env.YOUR_HOST_URL
}
const builder = new BeefreeSDK(token, authConf)
builder.start(beeConfig, template)
It requires a configuration for using the editor, beefree help documentation portal has a nice post explaining how to do it
Here is an example of the configuration; just read the official documentation for an extended version.
const beeConfig = {
uid: 'test1-clientside', //needed for identify resources of the that user and billing stuff
container: 'beefree-sdk-container', // Identifies the id of div element that contains the Beefree SDK builder
language: 'en-US',
onSave: (jsonFile, htmlFile) => {
console.log('onSave', jsonFile, htmlFile)
},
onSaveAsTemplate: (jsonFile) => {
console.log('onSaveAsTemplate', jsonFile)
},
onSend: (htmlFile) => {
console.log('onSend', htmlFile)
},
onError: (errorMessage) => {
console.log('onError ', errorMessage)
}
}
It requires an initial template to start editing. Learn more here
Some json avaible here https://github.com/BeefreeSDK/beefree-sdk-assets-templates
After the initialization you can call start to load the builder on the page; the method needs two parameters:
{ shared: true })this returns a promise that is resolved after we call the builder's start function
This changes the template; call load with the new template
This changes the template by trigging the loading dialog; just call reload with the new template
This calls the Beefree SDK save method, which in turn will trigger the callback onSave defined on the configuration for getting fresh HTML of the email and the JSON template updated.
This calls the Beefree SDK saveAsTemplate method, which in turn will trigger the callback onSaveAsTemplate defined in the configuration for getting only the current JSON of the instance.
This calls the Beefree SDK send method, which in turn will trigger the callback send defined in the configuration for getting only the current html of the instance.
This calls the Beefree SDK preview method, which triggers the preview modal inside the editor.
This calls the Beefree SDK toggleStructure method, which toggles the structure helper on the editor's stage.
This calls the Beefree SDK toggleStructure method, which toggles the comments section on the editor's sidebar.
This calls the Beefree SDK togglePreview method, which opens/closes the message preview behavior within the editor.
This calls the Beefree SDK showComment method, which opens a specific comment and scrolls the stage to the related element. The method needs one parameter, a comment 'uuid' as a string.
This calls the Beefree SDK loadConfig method, which reloads the JSON configuration used to initialize the builder.
After the initialization you can call join to load the builder on the page and join a collaborative editing session; the method needs two parameters:
onSessionStarted callback)this returns a promise that has resolved after we call the builder's start function. Visit the docs for more details about co-editing.
This call the Beefree SDK loadWorkspace method, which accepts one of the following parameters: 'default'|'mixed'|'amp_only'|'html_only'. Visit the docs for more details about workspaces.
This call the Beefree SDK loadStageMode method, which accepts an object parameter with the following structure: { mode: 'desktop'|'mobile', display: 'blur'|'hide'}. Visit the docs for more details about design mode.
This calls the Beefree SDK loadConfig method, which reloads the JSON configuration used to initialize the builder.
FAQs
wrapper of bee-plugin
We found that @mailupinc/bee-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.