Open simonhurtz opened 5 years ago
Sorry for bringing this up again: Is there any way to change the behavior when creating a link? I use the shortcut a lot, and it really consumes a lot of time to change the focus manually and select the URL instead of the text.
I looked into this and the place to fix this is probably: https://github.com/Ionaru/easy-markdown-editor/blob/f573560bb44886d7cc8d412a0b6712f18c3081f0/src/js/easymde.js#L853
I believe the second parameter (stat.link
) probably needs to change as that is what is controlling the final position of the cursor in _replaceSelection
. I don't really have the time to look into this myself and make sure this is tested, but I think this should be fairly trivial to fix for somebody with a bit more knowledge about JavaScript specifics.
I'd appreciate this as well as I think this is quite an annoying default behaviour.
We can probably introduce an option to change default behaviour and target the link instead.
I'm a happy user of the note taking app Standardnotes. 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 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: