LogoLogo
Try it outResourcesAPIsAddOnsBook a demo
  • Getting Started
    • Introduction to Beefree SDK
      • Create an Application
      • Installation and Fundamentals
        • Configuration parameters
          • Configuration Reload
          • Workspaces
          • Debugging the Beefree SDK Editor
        • Methods and Events
        • Authorization Process
        • How the UID parameter works
        • Set up two-factor authentication
        • Naming conventions
      • Development Applications
      • Manage Users
      • Manage Subscriptions
    • Tracking Message Changes
    • Sample Code
    • Release Candidate Environment
  • Visual Builders
    • Email Builder
    • Page Builder
      • Integrating Page Builder
      • Embedding videos in a page
    • Popup Builder
      • Popup Builder - Getting Started
      • Testing and Integrating
      • Setting layout and size
        • Advanced settings
    • AI-Driven Design Creation
  • APIs
    • Content Services API
      • Authentication
      • Export
      • Convert
      • Row Processing
      • AI Collection
      • Brand Style
      • Check
    • Template Catalog API
      • Authentication
      • Templates
      • Categories
      • Collections
      • Designers
      • Tags
    • HTML Importer API
      • Authentication
      • Import HTML
  • Forms
    • Form Block
    • Integrating and using the Form block
      • Passing forms to the builder
      • Form structure and parameters
      • Form layout customization
      • Allowed form fields
      • Edit form field modal
  • Rows
    • Reusable Content
      • Create Reusable Content
        • Pre-build Reusable Content
          • Implement Custom Rows
        • Save Reusable Content
          • Implement Hosted Saved Rows
          • Implement Self-hosted Saved Rows
            • Self-hosted Saved Rows Concepts and Tutorial
      • Sync Reusable Content
        • Implement Synced Rows
        • Initialize Edit Single Row Mode
      • Manage Reusable Content
    • Storage for Reusable Content
      • Hosted Saved Rows
      • Self-Hosted Saved Rows
  • File manager
    • File manager application overview
      • Mime Types and Groups
  • Server-side configurations
    • Server-side options
      • Toolbar options
      • Storage options
        • Configure your AWS S3 bucket
        • Connect your file storage system
      • Content options
      • Services options
      • Undo & Changes history
      • Custom JavaScript Libraries Injection
  • Other Customizations
    • Advanced options
      • 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
    • Appearance
      • Content Defaults
      • Custom Sidebar Position
      • Content Tile Sorting
      • Content Tile Grouping
      • Loading Spinner Theme
      • Custom Tab Layout
      • Themes
      • Custom CSS
        • Change Log
    • AMP for Email
    • Collaborative Editing
      • Co-editing Integration Guide
    • Mobile Design Mode
    • Multi-language Templates
    • Cards Style and Image Round Corners
    • Hover Effect for Buttons
    • Content Area Padding
    • Line Height
    • Frontend Commands
  • Data Structures
    • Getting Started
    • Schema Catalog
    • Simple Schema
      • Template Schema
      • Definitions Schema
      • Row Schema
      • Column Schema
      • Title Schema
      • Image Schema
      • Button Schema
      • Paragraph Schema
      • HTML Schema
      • Menu Schema
      • List Schema
      • Icon Schema
      • Divider Schema
    • Row Metadata
    • Form Validation Schema
    • Comments Schema
      • Change Schema for Comments
  • Builder AddOns
    • AddOns
      • AddOns Overview
      • Partner AddOns
        • Partner AddOns directory
        • Installing Partner AddOns
        • DeepL
        • Stability AI
        • Azure AI Vision - Image Analysis
          • Alternate Text Generation with AI
          • AI Alt Text Bulk Generation
        • AI Writing Assistant
          • Available Providers
            • OpenAI
            • Azure OpenAI
            • Anthropic
          • AI Providers and Data Security
          • AI-Generated Meta Tag Fields
          • Token Upselling
          • Apply a Brand Tone
        • Custom AI Writing Assistant
      • Custom AddOns
        • AddOn Development
        • Contribute to the Partner AddOn Marketplace
      • AddOns Configuration
      • AddOn FAQs
  • Resources
    • Error Management
      • onWarning
      • Beefree SDK Editor Errors
      • File System Provider errors
      • JSON Parser errors
      • Template Validation and Update
      • Template validation and update errors
    • Scheduled maintenances
Powered by GitBook
LogoLogo

Policies

  • Privacy & Cookies
  • Terms of Services
  • GDPR Compliance
  • Trust Center

Contact Us

  • Submit a request
  • Book a demo
  • Report a security issue
  • Beefree SDK Startup Program

Resources

  • Developer website
  • Create a Developer Account

© Bee Content Design, Inc. San Francisco, CA | Part of Growens

On this page
  • Instance Methods
  • Instance Events

Was this helpful?

Export as PDF
  1. Getting Started
  2. Introduction to Beefree SDK
  3. Installation and Fundamentals

Methods and Events

Instance Methods

Note: If initializing a File Manager application, the only supported method is beeInstance.start() without parameters.

Assuming that beeInstance is the instance of your embedded builder application, here are the methods you can call:

Method
Description

beeInstance.start(templateToLoad)

beeInstance.load(template)

Loads the JSON template string specified in the template parameter.

beeInstance.reload(template)

Loads the JSON template string specified in the template parameter. Unlike beeInstance.load(template), the reload method does not trigger a loading dialog. This method helps quickly reload a template seamlessly for specific use cases, such as using a custom undo/redo feature or injecting custom content in real-time.

beeInstance.execCommand

The frontend performs one of the following actions: highlight, scroll, focus, or select. This is based on the action and target defined in the object. Read more.

If you use a paid plan, you can hide the top toolbar and control the builder from your application’s user interface. For example, it’s up to you at that point to have buttons above or below the builder. Here’s some useful methods for this scenario:

Method
Description

beeInstance.preview()

Triggers the message preview behavior within the builder.

beeInstance.togglePreview()

Open/close the message preview behavior within the builder.

beeInstance.toggleStructure()

Controls the visibility of the structure outlines in the message editing portion of the builder.

beeInstance.save()

Invokes the onSave callback function. The application will pass two files to the function: a JSON file with the message structure (for later editing) and a ready-to-send HTML file.

beeInstance.saveAsTemplate()

Invokes the onSaveAsTemplate callback function. The application will pass to the function a JSON file with the message structure (for later editing).

beeInstance.send()

Invokes the onSend callback function. The application will pass to the function a ready-to-send HTML file. Important: This callback is only compatible with the email builder.

beeInstance.toggleMergeTagsPreview()

Controls the visibility of sample content for merge tags in the message editing portion of the builder.

Instance Events

The top toolbar displayed by default within the builder contains buttons that trigger certain actions. These are the callbacks that are triggered when the buttons are clicked.

Event
Description
Returned values

onSave

Fired when the Save button is clicked.

JSON and HTML documents

onSaveAsTemplate

Fired when “Save as template” is clicked.

JSON document

onAutoSave

Fired automatically based on autosave configuration parameter value.

JSON document

onSend

Fired when the “Send a test button” is clicked.

HTML document

onLoad

Fired when the JSON is loaded in the builder.

JSON document

onError

Fired every time an error occurs.

Error message

onPreview

Fired every time the preview button is pressed.

Status (Boolean)

onTogglePreview

Fired every time the preview is opened or closed.

Status (Boolean)

onChange

Fired every time a change on the message is performed.

onRemoteChange

Triggers during co-editing sessions. It notifies the frontend about changes made by other users in the session.

Note: This is for users B, C, D, and so on, while onChange is specific to the main user, User A, making the change.

onComment

Fired every time a thread or comment changes.

onFilePickerInsert

Object with file info

onFilePickerCancel

None

onViewChange

Fired when a view in SDK changes (eg. File manager opens, preview, or image editor)

Either one of these strings:

'fileManager' - When File Manager opens 'editor' - When the user closes one of the other views - also triggered when the Editor loads at first 'preview' - When preview gets opened 'imageEditor' - When the image editor gets opened

PreviousDebugging the Beefree SDK EditorNextAuthorization Process

Last updated 12 days ago

Was this helpful?

Starts the builder, loading the templateToLoad JSON string with the template structure (if specified). If using the NPM package, you have additional options to pass here as defined on the .

Read more about onRemoteChange and . Read more about .

Fired when the “insert” button is clicked. This property must be defined by the host application for the insert button to appear within the user interface. Available for only.

Fired when the “X” button is clicked. This property must be defined by the host application for the cancel “X” button to appear within the user interface. Available for only.

NPM page
Read More
tracking changes
collaborative editing
Read More
File Manager applications
File Manager applications