mermaid layout improvements

This commit is contained in:
zadam
2021-09-30 10:18:03 +02:00
parent f4dde84f06
commit af3fd61974
7 changed files with 23 additions and 10 deletions

View File

@@ -32,6 +32,16 @@ async function createNote(parentNotePath, options = {}) {
const parentNoteId = treeService.getNoteIdFromNotePath(parentNotePath);
console.log(options);
if (options.type === 'mermaid' && !options.content) {
options.content = `graph TD;
A-->B;
A-->C;
B-->D;
C-->D;`
}
const {note, branch} = await server.post(`notes/${parentNoteId}/children?target=${options.target}&targetBranchId=${options.targetBranchId}`, {
title: newNoteName,
content: options.content || "",