bryanph / GeistMap

An experimental personal knowledge base with a focus on connections
https://geistmap.com
GNU Affero General Public License v3.0
446 stars 31 forks source link

A better way to handle links #154

Open bryanph opened 6 years ago

bryanph commented 6 years ago

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:

fora do link

The cursor starts adjacent to the link but outside of it. Anything I type is just regular text. If I press left:

dentro do link

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: screenshot-2017-11-5 diagrama em branco lucidchart 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.