Ionaru / Ionaru/easy-markdown-editor
Copy / paste or upload an an image without a image extension (.png,.gif etc ...) is treated as a link
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I am using Appwrite as backend. Appwrite provides a storage engine that allows you to store any files. To retrieve them the link is something like [domain/project/view?id=8989890809
When pasting an image, I am using Appwrite to store it then retrieve the generated link which is passed to EasyMDE. EasyMDE considers it as link since there is no extension it recognized.
**Describe the solution you'd like**
2 solutions: one being less painful :smile:
Solution 1 (the painful one): EasyMDE is fetching the content to use its mime-type and make the proper decision about whether this is an image
Solution 2 : being able to call the success callback function from the imageUploadFunction with a additional parameter to specify that this is an image . i.e : instead of onSucces(url) -> onSuccess(url,thisIsAnImage)
Solution 3 : anything better :)
Contributor guide
Research direction
Start by tracing imageUploadFunction and the logic that decides whether a pasted or uploaded URL is an image. Compare the requested MIME-type lookup and callback metadata approaches, then check existing image-upload behavior. Done means image URLs without filename extensions are handled as images without breaking ordinary links.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100