Integrating the Embeddable Designer
Courier Create is designed to be simple to embed and customize within your React application. This guide walks you through the basic setup and advanced usage patterns for integrating the Template Editor.
Basic Setup
To start, install the package:
Import the required components and styles:
Use the components in your app:
TemplateProvider
creates the template automatically if it does not already exist. Publishing Hook
Users can override the default publish button with custom logic:
Theming Support
You can customize the editor’s appearance using the theme prop:
Disabling Auto-Save
By default, the Courier Create editor auto-saves content. To disable this feature, configure the provider as follows:
Using Variables
Variables are placeholders in your template that get replaced with actual data when the email is sent. For example, instead of writing Hello customer
you can write Hello {{user.firstName}}
, which will display the recipient’s actual name.
The Courier Embedabble editor supports nested variable structures:
How to Insert Variables
- When editing text, type
{{
to open the variable suggestions dropdown. Select the variable you want to insert from the list. - Via curly braces
{}
icon in top toolbar (if the variables are available for selected element).
Sending a Message
tenant_id
in the message context
and template
identifier.Overview
Your sample implementation will look something like this:
Embeddable Designer Preview