mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 01:36:24 +01:00
select template when creating note, closes #2813
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user