Press <esc> to exit edit view

Would it be possible to, while in edit mode in a node (so while markdown & latex are not rendered), to press esc (or other button) to exit edit mode, therefore having the content rendered? Even better if one could go back to the same point he was in edit mode by pressing esc again.

This would be really convenient while editing nodes with plenty of markdown and latex content, to check the result of what is being written, without having to click with the mouse outside the node area to have the content rendered and then click on the node to go back to the point that was being edited.

8 Likes

An alternative might be to render whenever no key has been pressed for some time.

Mhm, I don’t see why not. Anyone else interested in this?

5 Likes

+1 for hitting ESC to exit editing mode.

+1. Also,

  • Allow in rendered mode
    • navigation
    • expanding/collapsing
    • following links (if multiple, the first link only, or by number)
  • (Edit 1: I see this is now done. The cursor returns to either the item or it’s note. Edit 2: ESC only works in Firefox, not in Chrome.) When entering edit mode again, remember if it was an item itself or it’s note that was being edited. (Provided there was no movement at all while in rendered mode, of course. Otherwise you’d have to store this info with every item.)

If you leave edit mode, it ought to instead select the current item.

That might be some Firefox specific behavior since we haven’t done anything on our end.

If I understood correctly @Luca_Innocenti was basically talking about a quick way to blur the item without using the mouse? That would not select any item, unfortunately.

Blur means unfocus? Thats new to me.

I think that was the idea, but I propose a different one.

I mean, ideally I would love to have a(n extremely simplified version of a) dual vim-like interface, with an editing mode to write text, from which one can exit with <esc> to enter a “command mode” in which everything is rendered and the arrows (or, even better, hjkl) are used to navigate in the tree instead that in a single node (up and down to move between nodes, left and right to zoom and unzoom).

I just mentioned the <esc> feature here because that’s probably easier to implement, thus incrementing the chances of this being actually done sooner rather then later!

To me this select mode would be more critical for mobile where doesn’t even exist. To be able to just tap items for multi-select would be useful.

I see, it’s actually Vimium add-on that does it.

Well, “blur” might be a bit of a technical jargon, sorry about that. One really starts to forget the vocabulary most people use when they’ve worked with code too much. “blur”/“unfocus” both mean removing the blinking cursor/caret from the currently activated text field.

“A different one”: is that for multiselect on mobile? Since you posted here I thought you meant something related to unfocusing/blurring.

I see.

My main reasoning that Esc can exit edit view is that it’s pretty standard. If you start editing something on a webpage, and you hit Esc, you stop editing it. So I’m totally fine with that request.

I didn’t expect the request to be the part 1 for a vim-like mode for Dynalist. You can navigate with Up/Down/PageUp/PageDown on a webpage already, and since Dynalist is intended for most audiences, the hjkl part most likely won’t be implemented :frowning:

I figured as much, which is why I mentioned only the esc bit in the proposal! The rest is probably more suitable to be implemented with user scripts and such anyway.

Yep, thanks for being understanding.

User scripts or even plugins (when we have such a system) so it works on all platforms would be ideal.

I see this has been implemented, thanks a lot!

1 Like

Yes, thanks for noticing!

2 Likes

This is a really nice feature. I like it. Thanks for implementing it!

2 Likes

I had been having trouble with Esc in Chrome: often pressing Esc wouldn’t exit edit mode, meaning that if the current item included a link or formatting, I couldn’t easily switch to a clean view using the keyboard – very frustrating. After disabling all my extensions, the problem went away.

Attempting to narrow it down, it seems most likely that the problem is being caused by the extension Saka Key – unfortunately one of my favorite extensions. Thankfully, after adding https://dynalist.io to Saka Key’s blacklist, the problem has not recurred.

Edit: As of March 2020, a related problem is occuring, whereby when first loading or refreshing a Dynalist tab in Chrome, it gets focus but no cursor, so that keyboard shortcuts work (for navigating, zooming, jumping) but typing doesn’t – until I click which makes the cursor appear. Again, disabling Saka Key fixes the problem.

1 Like