select template when creating note, closes #2813

This commit is contained in:
zadam
2022-06-02 14:16:49 +02:00
parent b204014a11
commit 93f0596b16
12 changed files with 214 additions and 47 deletions

View File

@@ -170,9 +170,18 @@ function initNoteAutocomplete($el, options) {
}
if (suggestion.action === 'create-note') {
const noteTypeChooserDialog = await import('../dialogs/note_type_chooser.js');
const {success, noteType, templateNoteId} = await noteTypeChooserDialog.chooseNoteType();
if (!success) {
return;
}
const {note} = await noteCreateService.createNote(suggestion.parentNoteId, {
title: suggestion.noteTitle,
activate: false
activate: false,
type: noteType,
templateNoteId: templateNoteId
});
suggestion.notePath = treeService.getSomeNotePath(note);