[PR #144] [CLOSED] Proposition : Adding upload image url #413

Closed
opened 2026-03-15 02:13:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/arikchakma/maily.to/pull/144
Author: @Melvynx
Created: 3/5/2025
Status: Closed

Base: mainHead: feat/image-upload


📝 Commits (2)

  • c3134cf feat: add image upload functionality with drag-and-drop and paste support
  • 73450a9 feat: translate image upload example to English

📊 Changes

10 files changed (+483 additions, -23 deletions)

View changed files

packages/core/src/editor/extensions/image-upload.ts (+152 -0)
📝 packages/core/src/editor/extensions/index.ts (+14 -4)
📝 packages/core/src/editor/index.tsx (+8 -6)
📝 packages/core/src/editor/nodes/image/image-view.tsx (+136 -3)
packages/core/src/examples/image-upload-example.tsx (+121 -0)
packages/core/src/examples/index.ts (+1 -0)
📝 packages/core/src/extensions.ts (+11 -10)
📝 packages/core/src/index.ts (+1 -0)
packages/core/src/styles/editor.css (+37 -0)
📝 packages/core/src/styles/index.css (+2 -0)

📄 Description

Optional props that enable the editor to handle the upload of any image inside the editor.

Demo

Add these props:

<Editor
   onImageUpload={async (file) => {
      const blobUrl = URL.createObjectURL(file);
      return blobUrl;
    }}
/>

These props will just show the placeholder of the image.

Only when these props are provided does the editor support the upload of images like the example:

https://github.com/user-attachments/assets/b2734f5f-167b-48e3-8b82-272bca29a79e

Proposition for your online editor

Propose to people to use https://uploadthing.com/ in order to handle the image upload. If the uploadthing key is given inside the params (like Resend), the user will be able to drag and drop images, and they will be automatically uploaded to the service.

The service has a generous free tier.

Contributions

Feel free to directly update the code without asking me anything.

close #142


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/arikchakma/maily.to/pull/144 **Author:** [@Melvynx](https://github.com/Melvynx) **Created:** 3/5/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/image-upload` --- ### 📝 Commits (2) - [`c3134cf`](https://github.com/arikchakma/maily.to/commit/c3134cf68484927af05df461ffb6278191cc91b1) feat: add image upload functionality with drag-and-drop and paste support - [`73450a9`](https://github.com/arikchakma/maily.to/commit/73450a99940de5a37c0035d21ed10c72bb17f363) feat: translate image upload example to English ### 📊 Changes **10 files changed** (+483 additions, -23 deletions) <details> <summary>View changed files</summary> ➕ `packages/core/src/editor/extensions/image-upload.ts` (+152 -0) 📝 `packages/core/src/editor/extensions/index.ts` (+14 -4) 📝 `packages/core/src/editor/index.tsx` (+8 -6) 📝 `packages/core/src/editor/nodes/image/image-view.tsx` (+136 -3) ➕ `packages/core/src/examples/image-upload-example.tsx` (+121 -0) ➕ `packages/core/src/examples/index.ts` (+1 -0) 📝 `packages/core/src/extensions.ts` (+11 -10) 📝 `packages/core/src/index.ts` (+1 -0) ➕ `packages/core/src/styles/editor.css` (+37 -0) 📝 `packages/core/src/styles/index.css` (+2 -0) </details> ### 📄 Description **Optional** props that enable the editor to handle the upload of any image inside the editor. ## Demo Add these props: ```ts <Editor onImageUpload={async (file) => { const blobUrl = URL.createObjectURL(file); return blobUrl; }} /> ``` These props will just show the placeholder of the image. **Only when these props are provided** does the editor support the upload of images like the example: https://github.com/user-attachments/assets/b2734f5f-167b-48e3-8b82-272bca29a79e ## Proposition for your online editor Propose to people to use https://uploadthing.com/ in order to handle the image upload. If the uploadthing key is given inside the params (like Resend), the user will be able to drag and drop images, and they will be automatically uploaded to the service. The service has a generous free tier. ## Contributions Feel free to directly update the code without asking me anything. close #142 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-15 02:13:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/maily.to#413
No description provided.