Ionaru / Ionaru/easy-markdown-editor

Better cursor handling when creating links and pasting URLs

Open
#85 3 comments 0 reactions 0 assignees View on GitHub
Improvement
Dominant language
JavaScript
Stars
3.1k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

I'm a happy user of the note taking app [Standardnotes](https://standardnotes.org). It has integrated a couple of different open source editors. Most of the time, I use its Advanced Markdown Editor which is based on EasyMDE. Yesterday, [I opened an issue](https://github.com/standardnotes/forum/issues/542) in the Standardnotes repository. The dev told me that it would make more sense if I requested the feature over here. Here's the (slightly edited) copy:

> I need to create a lot of links within my notes. My workflow looks usually like this: I copy the URL of a certain tab in my browser, switch to Standardnotes and mark the text that should link to the website. Then, I press Ctrl+k in order to create a link.
>
> The shortcut creates the markdown syntax perfectly fine – but the handling of the cursor doesn't make sense to me. Instead of leaving the focus on the text, it would be better if the https:// part could get marked. Like this:
> Currently: [**text**] (https://)
> Preferred: [text] (**https://**)
>
> When using Ctrl+k after selecting text, you normally don't want to change the text again but paste the URL from your clipboard or type it manually. Either way, it would be better if the cursor could be placed within the () instead of the [].
>
> If that's not possible, could you give us an opportunity to deactivate the automatic insertion of https:// within the brackets? Then, I could just move the cursor with the arrow key and paste the link from the clipboard instead of deleting the prefilled text before.
>
> (I know that it sounds like a trifle, but I really paste a lot of links. A little change could greatly improve my workflow.)

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.