Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frontend/src/modules/notes/components/note-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
class="border border-gray-300 rounded-md pt-2 px-3 pb-10"
@focus="noteEditorFocused = true"
@blur="noteEditorFocused = false"
@keydown.enter="keydownSubmit($event)"
@keydown.esc="cancel()"
/>
<div
class="absolute right-3 transition-all transition-200"
Expand Down Expand Up @@ -153,6 +155,12 @@ const focus = () => {
editor.value.focus()
}

const keydownSubmit = (event) => {
if (event.metaKey || event.ctrlKey) {
submit()
}
}

const submit = () => {
if (props.note) {
NoteService.update(props.note.id, {
Expand Down