dullage / flatnotes

A self-hosted, database-less note taking web app that utilises a flat folder of markdown files for storage.
MIT License
1.5k stars 87 forks source link

Keyboard shortcut for preview #216

Closed marcxm closed 4 months ago

marcxm commented 4 months ago

Any option to add keyboard shortcut (similar to what CTRL+ENTER does to quick save) to toggle between edit and preview modes? this is since we don't change markdown to HTML on the fly (Obsidian case comes to mind), nor do we have preview space opened next to editor (Hedgedoc and similar). Maybe such keyboard shortcut would be something like ALT+V, so it doesn't conflict with browser printing shortcut? (ALT+P is probably not the best choice either, as it conflicts with menu option in Firefox, for example).

Thanks in advance for checking. Stay awesome!

dullage commented 4 months ago

Hey @marcxm. You can press e to enter edit mode and Esc to exit edit mode. Or are you describing these modes: image

marcxm commented 4 months ago

Yes, I was thinking about "Preview" mode shortcut, but I can see that "Esc" works just as well. Couldn't find shortcuts list on a page. Thank you.

dullage commented 4 months ago

I need to do a better job making these shortcuts discoverable in the UI. In the meantime, the wiki page is the best reference.