mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop
This commit is contained in:
@@ -62,7 +62,7 @@ async function createNote(parentNotePath: string | undefined, options: CreateNot
|
|||||||
|
|
||||||
const parentNoteId = treeService.getNoteIdFromUrl(parentNotePath);
|
const parentNoteId = treeService.getNoteIdFromUrl(parentNotePath);
|
||||||
|
|
||||||
if (options.type === "mermaid" && !options.content) {
|
if (options.type === "mermaid" && !options.content && !options.templateNoteId) {
|
||||||
options.content = `graph TD;
|
options.content = `graph TD;
|
||||||
A-->B;
|
A-->B;
|
||||||
A-->C;
|
A-->C;
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) =>
|
|||||||
const content = note.getContent();
|
const content = note.getContent();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
["text", "code"].includes(note.type) &&
|
["text", "code", "mermaid", "canvas", "relationMap", "mindMap", "geoMap"].includes(note.type) &&
|
||||||
typeof content === "string" &&
|
typeof content === "string" &&
|
||||||
// if the note has already content we're not going to overwrite it with template's one
|
// if the note has already content we're not going to overwrite it with template's one
|
||||||
(!content || content.trim().length === 0) &&
|
(!content || content.trim().length === 0) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user