hivewrite-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/bundle.min.js +2 -0
- package/index.d.ts +37 -0
- package/index.js +7 -0
- package/package.json +17 -0
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# hivewrite-sdk
|
|
2
|
+
|
|
3
|
+
Email Editor SDK for React and JavaScript applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install ./path/to/packages/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage in React
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import React, { useEffect, useRef } from 'react';
|
|
15
|
+
import { EmailEditor } from 'hivewrite-sdk';
|
|
16
|
+
|
|
17
|
+
const EmailEditorComponent = () => {
|
|
18
|
+
const containerRef = useRef(null);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (containerRef.current) {
|
|
22
|
+
EmailEditor.init({
|
|
23
|
+
apiKey: 'YOUR_API_KEY',
|
|
24
|
+
container: containerRef.current,
|
|
25
|
+
mode: 'FULL_EDITOR',
|
|
26
|
+
callbacks: {
|
|
27
|
+
onLoad: () => console.log('Editor Loaded'),
|
|
28
|
+
onSave: (design) => console.log('Saved:', design)
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}, []);
|
|
33
|
+
|
|
34
|
+
return <div ref={containerRef} style={{ height: '100vh', width: '100%' }} />;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default EmailEditorComponent;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
- Drag & Drop Interface
|
|
42
|
+
- MJML Export
|
|
43
|
+
- Custom Sections
|
|
44
|
+
- Merge Tags
|
|
45
|
+
- White Labeling
|