
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@dearj/react
Advanced tools
The official React wrapper for DearJ's powerful drag-and-drop email editor. Easily integrate professional email editing capabilities into your React applications.
@dearj/typesnpm install @dearj/react
or
yarn add @dearj/react
import React, { useRef } from "react";
import { EmailEditor, EmailEditorRef } from "@dearj/react";
import { EditorConfig, Template } from "@dearj/types";
const MyEmailEditor = () => {
const editorRef = useRef<EmailEditorRef>(null);
const editorOptions: EditorConfig = {
authorization: "your-auth-token-here", // Required
version: "latest", // Optional
};
const initialDesign: Template | undefined = undefined; // Optional
const handleLoaded = () => {
console.log("Editor is loaded");
};
const handleUpdated = () => {
console.log("Editor design updated");
};
const exportHtml = async () => {
const html = await editorRef.current?.exportHtml();
console.log("Exported HTML:", html);
};
const exportJson = async () => {
const json = await editorRef.current?.exportJson();
console.log("Exported JSON:", json);
};
return (
<div style={{ height: "600px" }}>
<EmailEditor
ref={editorRef}
options={editorOptions}
design={initialDesign}
onLoaded={handleLoaded}
onUpdated={handleUpdated}
/>
<div style={{ marginTop: "1rem" }}>
<button onClick={exportHtml}>Export HTML</button>
<button onClick={exportJson}>Export JSON</button>
</div>
</div>
);
};
| Input | Type | Required | Description |
|---|---|---|---|
options | EditorConfig | Yes | Editor configuration including authorization |
design | Template | null | No | Initial template to load |
| onLoaded | () => void | No | Called when the editor finishes loading |
| onUpdated | () => void | No | Called when the template is updated |
| Method | Returns | Description |
|---|---|---|
exportHtml() | Promise<string> | Exports current design as HTML string |
exportJson() | Promise<Template> | Exports current design as JSON template |
The authorization token is required for editor functionality. Handle tokens securely:
// Recommended approach - fetch from secure storage
editorOptions: EditorConfig = {
authorization: "YOUR_AUTHORIZATION_TOKEN" || "",
version: "latest",
};
DearJ is available under the BSD-3-CLAUSE License.
FAQs
A component for building html content templates using drag and drop in react.
We found that @dearj/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.