Ionaru / Ionaru/easy-markdown-editor
Image alt text selection activates link button in toolbar
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Setting the cursor in the alt text section of an image incorrectly activates the link button in the toolbar.
**To Reproduce**
`` set cursor in alt text section.
**Additional context**
The CodeMirror state type is set to `image image-alt-text link`. However the EasyMDE `getState()` method returns `link`, see https://github.com/Ionaru/easy-markdown-editor/blob/master/src/js/easymde.js#L333
Contributor guide
Research direction
Start with src/js/easymde.js at the getState() method around line 333, and compare its result with the CodeMirror state when the cursor is in image alt text. Reproduce the issue using the provided image Markdown, then verify that the alt-text state is handled without activating the link toolbar button.
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
- Clearly specified
- Newbie friendliness
- 30/100