Email content

A WYSIWYG email editor for your app.

Write email as rich text, personalise it with merge fields, and export HTML that mail clients keep.

Details

Let your users write campaigns, notifications and templates in a familiar editor. They insert merge fields, preview the message with sample data, and your app receives HTML with the styles inlined. You send it through the mail service you already use.

What the editor does, and what it leaves to you

It writes the email. You send it.

Merge fields you defineEach field is a chip the writer cannot break by typing inside it. A preview shows sample values.
HTML that mail clients keepgetEmailHTML() inlines every style rule and wraps the body to a fixed width.
No sending service includedThe editor produces the HTML. Delivery, lists and unsubscribe handling stay with your mail service.

Define the merge fields

Your application lists the fields a writer may use. Each one has an id, a label for the menu, and a sample value for the preview.

// Your app defines its own fields. "sample" is what the preview shows,
// so a writer sees the finished sentence, not a placeholder.
var cfg = {};
cfg.mergeFields = [
  { id: "recipient.name", label: "Recipient name", sample: "Ada Lovelace" },
  { id: "company.name",   label: "Company",        sample: "Analytical Engines Ltd" }
];
cfg.emailWrapWidth = 640;

var editor = new RichTextEditor("#editor", cfg);

Insert, preview and merge

A merge field is inserted as a single chip. Turn on the preview to show sample values in place, or render the document against one recipient’s data to get a finished message.

editor.insertMergeField("recipient.name");   // inserts an atomic chip
editor.setMergeFieldPreview(true);           // swap chips for sample values
editor.renderMergeFields(row);               // one finished letter per recipient

Export HTML for mail clients

Many mail clients remove <style> blocks. getEmailHTML() writes each rule onto the element it applies to and wraps the body to the width you set. Test the result in the clients your readers use: rendering still differs between them, and the email HTML export article lists the differences to check.

// Mail clients drop <style> blocks, so every rule is inlined onto the element
// and the body is wrapped to emailWrapWidth. This is what you hand to your mail service.
var html = editor.getEmailHTML({ width: 640 });

Before you choose it for email

  • It is a document editor, not a drag-and-drop template builder. Writers edit text, tables, images and links.
  • Your server still has to clean the HTML. Treat the exported HTML as user input and sanitize it before you store or send it.
  • Licensing is one-time: a perpetual license from $129, with the email features in every tier. See pricing.