mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
create note from template WIP
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user