create note from template WIP

This commit is contained in:
zadam
2022-05-31 23:27:45 +02:00
parent 98b579524c
commit b204014a11
3 changed files with 19 additions and 5 deletions

View File

@@ -155,6 +155,14 @@ function createNewNote(params) {
scanForLinks(note);
if (params.templateNoteId) {
if (!becca.getNote(params.templateNoteId)) {
throw new Error(`Template note '${params.templateNoteId}' does not exist.`);
}
note.addRelation('template', params.templateNoteId);
}
copyChildAttributes(parentNote, note);
triggerNoteTitleChanged(note);