
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@dearj/angular
Advanced tools
The official Angular wrapper for DearJ's powerful drag-and-drop email editor. Easily integrate professional email editing capabilities into your Angular applications.
The official Angular wrapper for DearJ's powerful drag-and-drop email editor. Easily integrate professional email editing capabilities into your Angular applications.
@dearj/typesnpm install @dearj/angular
or
yarn add @dearj/angular
import { EmailEditorModule } from "@dearj/angular";
@NgModule({
imports: [
// ... other modules
EmailEditorModule,
],
})
export class AppModule {}
<email-editor
#emailEditor
[options]="editorOptions"
[design]="templateDesign"
(loaded)="onEditorLoaded()"
></email-editor>
<button (click)="exportHtml()">Export HTML</button>
<button (click)="exportJson()">Export JSON</button>
import { Component, ViewChild } from "@angular/core";
import { EmailEditor, EditorConfig, Template } from "@dearj/angular";
@Component({
selector: "app-email-editor",
templateUrl: "./email-editor.component.html",
})
export class EmailEditorComponent {
@ViewChild("emailEditor") emailEditor!: EmailEditor;
editorOptions: EditorConfig = {
authorization: "your-auth-token-here", // Required
version: "latest", // Optional
};
templateDesign: Template | null = null; // Initial template (optional)
onEditorLoaded() {
console.log("Editor ready!");
}
async exportHtml() {
try {
const html = await this.emailEditor.exportHtml();
console.log("Exported HTML:", html);
// Handle HTML export
} catch (error) {
console.error("Export failed:", error);
}
}
async exportJson() {
try {
const json = await this.emailEditor.exportJson();
console.log("Exported JSON:", json);
// Handle JSON export
} catch (error) {
console.error("Export failed:", error);
}
}
}
| Input | Type | Required | Description |
|---|---|---|---|
options | EditorConfig | Yes | Editor configuration including authorization |
design | Template | null | No | Initial template to load |
| Event | Type | Description |
|---|---|---|
loaded | EventEmitter<void> | Emitted when editor finishes loading design |
updated | EventEmitter<void> | Emitted when editor finishes design 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 open-source and available under the MIT License.
FAQs
The official Angular wrapper for DearJ's powerful drag-and-drop email editor. Easily integrate professional email editing capabilities into your Angular applications.
We found that @dearj/angular 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.