Skip to main content

Quick start

Add BubbleMenu.ButtonDefault and a slash command for inserting buttons.

Button content format

Buttons in the editor are represented as styled anchor elements:
The wrapping div controls alignment (left, center, or right), while the <a> tag renders as a styled button in the editor and serializes to a React Email <Button> component on export.

Editing buttons

When you click a button in the editor, the button bubble menu appears with:
  • Edit link (pencil icon): Opens an inline form to change the button’s URL
  • Unlink: Removes the button link
The form validates URLs and lets you apply or cancel changes inline.

Inserting buttons programmatically

Use the setButton command to insert a button via the editor API.
This can be triggered from a custom toolbar.

Examples

See buttons in action with a runnable example:

Buttons

Button insertion and editing with the button bubble menu.