Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(template): duplicate content for canvas
Elian Doran5d9bea898758
diff --git a/src/services/handlers.ts b/src/services/handlers.tsindex 5c65c8a498..a5580c5b1d 100644--- a/src/services/handlers.ts+++ b/src/services/handlers.ts@@ -102,7 +102,7 @@ eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) =>const content = note.getContent();if (- ["text", "code", "mermaid"].includes(note.type) &&+ ["text", "code", "mermaid", "canvas"].includes(note.type) &&typeof content === "string" &&// if the note has already content we're not going to overwrite it with template's one(!content || content.trim().length === 0) &&