zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
26.71k stars 1.85k forks source link

Inline Mermaid diagram support #3159

Open htjain opened 1 year ago

htjain commented 1 year ago

Describe feature

Thanks for creating Trillium. It's amazing tool and have most of the feature I need. One feature which I am mssing is inline Mermaid diagram support while writing in text mode. I can create sub notes and refer it with @note but it doesn't give preview in place.

e.g.

Some heading

description

graph TD; A-->B; A-->C; B-->D; C-->D;

Some more text

Current view: image

Additional Information

No response

sigaloid commented 1 year ago

As a temporary solution, you can use the Include Note feature.

htjain commented 1 year ago

Thanks. It kindof worked but take full row even if drawing is small. I is possible to change display size.

image

zadam commented 1 year ago

No, "include note" feature is always block-sized.

meichthys commented 11 months ago

@zadam perhaps we could add the ckeditor mermaid diagram plugin? That would close this issue and #4002 It would also have the added benefit of being able to hide the mermaid code editor. It may also remove the need for the Mermaid Diagram note type(?) The main downside I see is that it is still labeled as experimental in the ckeditor docs.