@edmissioncrm/editor 0.1.1 → 0.1.3
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 +10 -1
- package/dist/index.cjs +78 -78
- package/dist/index.js +11192 -10912
- package/index.d.ts +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,9 @@ your own backend for uploads, AI and file storage.
|
|
|
11
11
|
- Undo / redo, saved versions with compare and restore, custom themes
|
|
12
12
|
- AI helper in every text field: improve writing, fix grammar, shorter / longer, change tone
|
|
13
13
|
- Image library: upload, **Amazon S3** and **Google Drive**
|
|
14
|
+
- Video block that plays: upload a video file (its first frame becomes the thumbnail) or paste a YouTube / Vimeo link
|
|
15
|
+
- Form block with a picker for your published forms, shown live in the canvas and the preview
|
|
16
|
+
- Optional email size limit with a live size badge
|
|
14
17
|
- Opens existing `react-email-editor` designs and keeps its component API, so migrating is a one-line change
|
|
15
18
|
|
|
16
19
|
## Install
|
|
@@ -82,6 +85,9 @@ options={{ mergeTags: { first_name: { name: "First name", value: "{{first_name}}
|
|
|
82
85
|
| `aiGeneratePath` | `/mail-templates/ai-generate` | AI endpoint |
|
|
83
86
|
| `s3ListEndpoint` | `${apiBaseUrl}/buzz-communication/upload/template-assets` | Files shown in the Amazon S3 tab |
|
|
84
87
|
| `googleClientId` | none | Shows the Google Drive tab (OAuth Web client id) |
|
|
88
|
+
| `formsPath` | `/enquiry-forms/published-links` | Lists your published forms and their links |
|
|
89
|
+
| `formUrlBase` | none | Public form link prefix (the form's link id is appended). Turns on the Form block's form picker |
|
|
90
|
+
| `maxEmailBytes` | none | Largest the email may get in bytes (text plus images and videos). Uploads that would pass it are refused and a size badge is shown |
|
|
85
91
|
|
|
86
92
|
**Your backend** holds every secret; the editor never does. Requests are sent with
|
|
87
93
|
`credentials: "include"` and the `organization-id` / `Authorization` headers, so allow those in CORS.
|
|
@@ -90,7 +96,10 @@ options={{ mergeTags: { first_name: { name: "First name", value: "{{first_name}}
|
|
|
90
96
|
| --- | --- | --- |
|
|
91
97
|
| Upload `POST {uploadPath}` | multipart form, field `file` | `{ "file": { "url": "https://…" } }` |
|
|
92
98
|
| AI `POST {aiGeneratePath}` | JSON `{ prompt, allowedVariables?, currentSubject?, currentHtmlContent? }` | `{ "subject": "…", "htmlContent": "<html>…" }` |
|
|
93
|
-
| List `GET {s3ListEndpoint}` | none | `{ "items": [{ "id", "key", "url", "name", "kind" }] }`, `kind` is `image`, `gif`, `video` or `pdf` |
|
|
99
|
+
| List `GET {s3ListEndpoint}` | none | `{ "items": [{ "id", "key", "url", "name", "kind", "size" }] }`, `kind` is `image`, `gif`, `video` or `pdf`, `size` is in bytes |
|
|
100
|
+
| Forms `GET {formsPath}` | none | `[{ "id", "title", "urls": [{ "url_id", "label" }] }]` |
|
|
101
|
+
|
|
102
|
+
When a request fails, the editor shows the `message` your backend returns, so send a readable one (for example "File too large").
|
|
94
103
|
|
|
95
104
|
Return only the signed-in organization's files from the list endpoint, and use public URLs for uploaded
|
|
96
105
|
images so they load in the recipient's inbox.
|