Ionaru / Ionaru/easy-markdown-editor

Add `onUploading` for `imageUploadFunction`

Open
#588 0 comments 2 reactions 0 assignees View on GitHub
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.**
When remote server is slow and I paste/upload an image, there is no reaction in easyMDE and make users wonder if they did it correctly, some may try to paste again leading to double uploads

**Describe the solution you'd like**
Show a progress indicator like GitHub `![Uploading image.png…]()` and replace it with the actual link thereafter.
From the code, I think it make sense to add `onUploading` and `onUploaded` if necessary, i.e.
```
imageUploadFunction: function(file, onSuccess, onError, onUploading) {
// ... some validation
onUploading("Uploading image.png...")
```

**Describe alternatives you've considered**
none

**Additional context**
none

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.