Ionaru / Ionaru/easy-markdown-editor
Custom Toolbar for "upload-image" doesn't appear to work
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I'm working to set a custom icon for the Upload Image button. When I do so the button no longer functions. Since the action was not documented I dug around and sussed out that it should be `EasyMDE.drawUploadedImage` and set it as such.
My custom toolbar code is as follows:
```
toolbar: [{
name: "upload-image",
action: EasyMDE.drawUploadedImage,
className: "icon-photo",
title: "Upload Image",
}],
```
**Expected behavior**
Should trigger the file chooser to find a local file to upload.
Contributor guide
Research direction
Start with the custom toolbar configuration in the issue and inspect how EasyMDE.drawUploadedImage is wired to the upload-image action. Reproduce the configuration, then verify that using a custom icon still opens the local file chooser and preserves the upload behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100