hivewrite-sdk 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +33 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@ Email Editor SDK for React and JavaScript applications.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install ./path/to/packages/sdk
8
+ npm install hivewrite-sdk
9
9
  ```
10
10
 
11
11
  ## Usage in React
@@ -37,6 +37,38 @@ const EmailEditorComponent = () => {
37
37
  export default EmailEditorComponent;
38
38
  ```
39
39
 
40
+ ## Usage in Plain HTML/JS
41
+
42
+ You can use the SDK via a CDN (like JSDelivr) or by hosting the `bundle.min.js` file yourself.
43
+
44
+ ### Using a CDN (UNPKG/JSDelivr)
45
+ ```html
46
+ <!DOCTYPE html>
47
+ <html>
48
+ <head>
49
+ <title>Email Editor Test</title>
50
+ </head>
51
+ <body>
52
+ <div id="editor" style="height: 100vh;"></div>
53
+
54
+ <!-- Load the SDK -->
55
+ <script src="https://cdn.jsdelivr.net/npm/hivewrite-sdk/bundle.min.js"></script>
56
+
57
+ <script>
58
+ EmailEditor.init({
59
+ apiKey: 'YOUR_API_KEY',
60
+ container: '#editor',
61
+ mode: 'FULL_EDITOR',
62
+ callbacks: {
63
+ onLoad: () => console.log('SDK Loaded'),
64
+ onSave: (design) => console.log('Design:', design)
65
+ }
66
+ });
67
+ </script>
68
+ </body>
69
+ </html>
70
+ ```
71
+
40
72
  ## Features
41
73
  - Drag & Drop Interface
42
74
  - MJML Export
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hivewrite-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Email Editor SDK for React and JavaScript applications",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",