Skip to content

feat(editor): add EmailEditor high-level component - #3115

Merged
joaopcm merged 6 commits into
feat/ai-oss-editorfrom
feature/product-1690-work-on-the-one-line-editor
Mar 26, 2026
Merged

joaopcm merged 6 commits into
feat/ai-oss-editorfrom
feature/product-1690-work-on-the-one-line-editor

Conversation

@joaopcm

@joaopcm joaopcm commented Mar 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Introduces a batteries-included EmailEditor component that wraps TipTap's EditorProvider with all default UI pre-wired — bubble menus, slash command, and theming.

The component uses a RefBridge pattern to expose export(), getJSON(), getHTML(), and the raw editor instance via React.forwardRef. Props cover content, onChange/onReady callbacks, image upload, theme (basic/minimal), editability, placeholder, bubble menu exclusions, and custom extensions.

Also adds a root "." export entry in package.json and a matching build entry point in tsdown.config.ts, so consumers can import { EmailEditor } from '@react-email/editor' directly.

Testing steps

  • Import EmailEditor from @react-email/editor (root export) and verify it resolves correctly
  • Render EmailEditor with default props and confirm bubble menus, slash command, and theming work
  • Switch theme between basic and minimal and verify the editor remounts with the correct theme
  • Pass a ref and call export(), getJSON(), getHTML() — verify they return expected output
  • Provide custom extensions prop and confirm it overrides the defaults entirely
  • Test onReady and onChange callbacks fire at the expected times
  • Test editable={false} disables editing
  • Verify the build produces dist/index.mjs and dist/index.cjs

Summary by cubic

Adds a batteries‑included EmailEditor that wraps TipTap’s EditorProvider with default UI and a simple ref API. Also adds “One‑Line Editor” examples (minimal and full) to demo theme switching and ref methods for PRODUCT‑1690.

  • New Features

    • High-level React component with StarterKit, UndoRedo, theming (basic/minimal), and default CSS.
    • Default UI: bubble menus (text, link, image, button) and slash command.
    • Ref API: export(), getJSON(), getHTML(), plus editor.
    • Props: content, onChange/onReady, onUploadImage (paste/drop), editable, placeholder, bubble menu exclusions, extensions, className.
    • Examples: “One‑Line Editor” (Minimal) and “One‑Line Editor — Full Features” with theme toggle and ref methods.
  • Migration

    • Import from root: import { EmailEditor } from '@react-email/editor'.
    • Passing extensions replaces the defaults.
    • Switch theme to remount with basic or minimal.

Written for commit bb8ac67. Summary will update on new commits.

Introduces a batteries-included EmailEditor component that wraps
EditorProvider with all default UI pre-wired (bubble menus, slash
command, theming). Adds root package export and build entry point.
@changeset-bot

changeset-bot Bot commented Mar 25, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bb8ac67

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment Mar 26, 2026 8:25pm
react-email-demo Ready Ready Preview, Comment Mar 26, 2026 8:25pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Mar 25, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/editor@3115

commit: 784518f

@joaopcm joaopcm self-assigned this Mar 25, 2026
@joaopcm
joaopcm requested a review from a-carciu March 25, 2026 19:57

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Comment thread packages/editor/src/email-editor/email-editor.tsx
@joaopcm
joaopcm requested review from gabrielmfern and removed request for a-carciu March 25, 2026 20:53
Comment thread packages/editor/src/email-editor/email-editor.tsx Outdated
Comment thread packages/editor/src/email-editor/email-editor.tsx
@socket-security

socket-security Bot commented Mar 26, 2026 •

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@joaopcm

joaopcm commented Mar 26, 2026

Copy link
Copy Markdown
Member Author

Auto-merge enabled (squash) via PR Sentinel.

@joaopcm
joaopcm merged commit ae5fc27 into feat/ai-oss-editor Mar 26, 2026
14 checks passed
@joaopcm
joaopcm deleted the feature/product-1690-work-on-the-one-line-editor branch March 26, 2026 20:26

This branch was successfully deployed

2 active deployments
Preview – react-email-demo — bb8ac67d Deployed Mar 26, 2026 by vercel[bot]
Preview – react-email — bb8ac67d Deployed Mar 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants