A better way to handle links
bryanph opened this issue · comments
As proposed by @ri73 (thanks!)
Edge Case
When the text cursor is at the end or the beginning of a link the current editor adds everything you type to the link. This gets somewhat annoying when editing. I suggest handling links in a similar way to WordPress' editor:
The cursor starts adjacent to the link but outside of it. Anything I type is just regular text. If I press left:
The cursor remains in the same place but it's now inside the link. Anything I type is considered part of the link.
An intuitive, mouse-free way to edit URL's
When inside the link the WordPress' editor displays that little box with the URL, I think it's a good idea to allow the user to access it via the keyboard with the following logic:
Pressing up/down while inside the link box would result in either returning to the original line or going up/down a line. Also, it would be important to automatically select the whole URL when entering the box since URL's generally get replaced entirely instead of edited.