The editor doesn't load while I develop with Vite
The editor doesn't load while I develop with Vite
The renderer runs in a worker file that ships beside the editor’s
index.js. If Vite pre-bundles the package, the worker isn’t found while you develop. Leave the package out of optimizeDeps:Which version of React does it need?
Which version of React does it need?
React 18. The editor uses your app’s own copy of React and React DOM, so install them next to it:If your app doesn’t use React, use
mountEmailLoveEditor. See Install and quick start.What is the worker file?
What is the worker file?
The editor renders emails with MJML in the browser, in a worker. The worker file ships beside
index.js in the package. Bundlers copy it for you. With Vite, see the first question.Does the editor need a height?
Does the editor need a height?
Yes. The element the editor goes in needs a height, for example
<div style={{ height: 720 }}>.Does the editor send data to Email Love?
Does the editor send data to Email Love?
No. The editor has no server and sends nothing anywhere. Your app’s
email.open, email.save and images.upload decide where emails and pictures go.The built-in design system’s pictures are served from Email Love’s CDN and from https://app.emaillove.com. To serve the app-served ones yourself, set assetBase. See Design systems and your own components.Can it send test emails, export to my email platform or use AI?
Can it send test emails, export to my email platform or use AI?
Not on its own. Test emails, live co-editing, AI, accounts and export to email platforms are in the hosted Email Love Builder. See Email Love SDK for hosted plans.You can also build them into your own app. The session gives you the HTML, MJML and plain text, and
onChange gives you every change.What is the license?
What is the license?
BSD 3-Clause, Copyright Email Love LLC. Each package lists the third-party code it includes. The Email Love name and logo aren’t covered by the license.
How do I build it from source?
How do I build it from source?
At the repository’s root:The build goes to
packages/editor/dist/. The editor imports Core’s source from packages/core/src, so a change to Core shows in the editor at once.
