Gathering detailed insights and metrics for react-email-editor
Gathering detailed insights and metrics for react-email-editor
Gathering detailed insights and metrics for react-email-editor
Gathering detailed insights and metrics for react-email-editor
@types/react-email-editor
TypeScript definitions for react-email-editor
md-to-react-email
A simple Markdown to jsx parser for email templates written in typescript.
react-email
A live preview of your emails right in your browser.
@react-email/render
Transform React components into HTML email templates
npm install react-email-editor
95.5
Supply Chain
97.9
Quality
81.1
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
4,633 Stars
193 Commits
744 Forks
52 Watching
8 Branches
12 Contributors
Updated on 29 Nov 2024
TypeScript (90.28%)
JavaScript (9.72%)
Cumulative downloads
Total Downloads
Last day
-9.7%
8,047
Compared to previous day
Last week
9.3%
47,725
Compared to previous week
Last month
2.1%
186,389
Compared to previous month
Last year
71.7%
2,513,849
Compared to previous year
1
1
The excellent drag-n-drop email editor by Unlayer as a React.js wrapper component. This is the most powerful and developer friendly visual email builder for your app.
Video Overview |
---|
Watch video overview: https://youtu.be/MIWhX-NF3j8 |
Check out the live demo here: https://react-email-editor-demo.netlify.app/ (Source Code)
Here's a blog post with a quickstart guide: https://medium.com/unlayer-blog/creating-a-drag-n-drop-email-editor-with-react-db1e9eb42386
The easiest way to use React Email Editor is to install it from NPM and include it in your own React build process.
npm install react-email-editor --save
Require the EmailEditor component and render it with JSX:
1import React, { useRef } from 'react'; 2import { render } from 'react-dom'; 3 4import EmailEditor, { EditorRef, EmailEditorProps } from 'react-email-editor'; 5 6const App = (props) => { 7 const emailEditorRef = useRef<EditorRef>(null); 8 9 const exportHtml = () => { 10 const unlayer = emailEditorRef.current?.editor; 11 12 unlayer?.exportHtml((data) => { 13 const { design, html } = data; 14 console.log('exportHtml', html); 15 }); 16 }; 17 18 const onReady: EmailEditorProps['onReady'] = (unlayer) => { 19 // editor is ready 20 // you can load your template here; 21 // the design json can be obtained by calling 22 // unlayer.loadDesign(callback) or unlayer.exportHtml(callback) 23 24 // const templateJson = { DESIGN JSON GOES HERE }; 25 // unlayer.loadDesign(templateJson); 26 }; 27 28 return ( 29 <div> 30 <div> 31 <button onClick={exportHtml}>Export HTML</button> 32 </div> 33 34 <EmailEditor ref={emailEditorRef} onReady={onReady} /> 35 </div> 36 ); 37}; 38 39render(<App />, document.getElementById('app'));
See the example source for a reference implementation.
All unlayer methods are available in the editor instance (emailEditorRef.current.editor
). See the Unlayer Docs for more information, or log the object in the console to explore it. Here are the most used ones:
method | params | description |
---|---|---|
loadDesign | Object data | Takes the design JSON and loads it in the editor |
saveDesign | Function callback | Returns the design JSON in a callback function |
exportHtml | Function callback | Returns the design HTML and JSON in a callback function |
editorId
{String
} HTML div id of the container where the editor will be embedded (optional)minHeight
{String
} minimum height to initialize the editor with (default 500px)onLoad
{Function
} called when the editor instance is createdonReady
{Function
} called when the editor has finished loadingoptions
{Object
} options passed to the Unlayer editor instance (default {})
style
{Object
} style object for the editor container (default {})Custom tools can help you add your own content blocks to the editor. Every application is different and needs different tools to reach it's full potential. Learn More
You can submit new language translations by creating a PR on this GitHub repo: https://github.com/unlayer/translations. Translations managed by PhraseApp
Copyright (c) 2024 Unlayer. MIT Licensed.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
Found 5/18 approved changesets -- score normalized to 2
Reason
2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
36 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More