@email-love/core is the engine under the editor. It renders an email from a design system and a document, checks documents, imports MJML or HTML, and applies editing operations. It has no database and no server, and it doesn’t need React. It runs in Node and in the browser.
Render an email
renderEmail(designSystem, document, options) returns { ok, html, mjml, errors, warnings }. html is email-ready HTML, with MJML underneath, tested across the inbox clients Email Love supports.
Options
Import MJML or HTML
importMjml(mjml)turns MJML into a design system and a document.importHtml(html, designSystem)turns an HTML email into a document built from the design system you pass.
Plain text
plainTextOf(html) gives the plain-text part of a finished email. Links and merge tags are kept.
Everything in the package
For the document and design system formats, see Design systems and your own components and FORMAT.md.
Contributing
Issues and pull requests are welcome on GitHub. Sign off your commits withgit commit -s, under the Developer Certificate of Origin.
