easy-markdown-editor icon indicating copy to clipboard operation
easy-markdown-editor copied to clipboard

Image alt text selection activates link button in toolbar

Open wvdongen opened this issue 3 years ago • 1 comments

Describe the bug Setting the cursor in the alt text section of an image incorrectly activates the link button in the toolbar.

To Reproduce ![Alt text](https://example.com/example.jpg) 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

wvdongen avatar Mar 02 '22 12:03 wvdongen

Looks easy enough to add a case for image there.

Ionaru avatar Mar 02 '22 12:03 Ionaru