mirror of
https://github.com/arikchakma/maily.to.git
synced 2026-04-25 22:25:51 +03:00
[PR #144] [CLOSED] Proposition : Adding upload image url #413
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/maily.to#413
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/arikchakma/maily.to/pull/144
Author: @Melvynx
Created: 3/5/2025
Status: ❌ Closed
Base:
main← Head:feat/image-upload📝 Commits (2)
c3134cffeat: add image upload functionality with drag-and-drop and paste support73450a9feat: 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:
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.