-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard Shortcut to Save a Note #59
Comments
I'm sure this will be possible but alas, it has confounded me so far (as you've seen from my commented attempt). I haven't spent too much time looking into it so when I get the chance I'll take another look. |
I think this feature can be split into two parts. First part is a fast save function --- this will send a request to the server this will save the note, without going back to the overview So, catching a 1) keypress in javascript, 2) collecting current Note name and Note text and 3) sending a patch request to /api/notes/Notename. All of this is just client side. If you tell me which files to look for each 1), 2) and 3) that are relevant, I can take a look as well. |
I like the idea of having an option to save without closing. But please raise a separate suggestion for this and I'll add some notes there. Regarding the keyboard shortcut, the trouble I'm having is that the markdown editor I'm using (Toast UI Editor) is capturing the keypresses and not bubbling them up to my code. I've previously tried |
Same here - would be great to have a shortcut to save (e.g. ctrl+shift+s, ctrl+shift+enter) - or the auto-save alternative |
Indeed. Would be great to be able to save notes by using keyboard shortcut. |
A couple of days ago I merged a change into the develop branch that allows for notes to be saved without closing the note. Additionally, I've added 2 new keyboard shortcuts available when editing a note:
If anyone wants to give this a go before release you can pull and run the |
Tested it today with develop docker image and I can confirm it works as intended. Thank you! great work. |
This change is now available in 5.2.0. 🚀 |
Is there a way to overwrite the keyboard shortcuts of the toast-ui editor?
I found an attempt of using
ctrl+s
in thecreated
function inNoteViewEditor.vue
that has been commented out - understandably.If I turn off the toast-ui shortcuts via
editorOptions: { useCommandShortcut: false }
(inNoteViewerEditor.vue:206
- defaults totrue
) and enable theMousetrap
binding forctrl+s
(inNoteViewerEditor.vue:528
), the editor shortcuts do indeed stop working, but theMousetrap
bindings don't work either. If you pressctrl+s
, the event is simply passed through to the browser and it attempts to save the entire page as an html file.The text was updated successfully, but these errors were encountered: