Skip to content
Mimir Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Drawing diagrams

Write Mermaid diagram text in a bullet and Mimir draws it in place, in Mimir's colors.

Write a diagram as text in a bullet and Mimir draws it. The text is Mermaid, the diagram language used by Obsidian and many other tools.

The first line names the kind of diagram. The lines after it describe what’s in it.

flowchart LR
  Idea --> Draft
  Draft --> Review
  Review --> Draft
  Review --> Done

Writing a diagram

Type the diagram’s name on the first line, then press Shift-Return to start the second line.

Tap Shift before you type the diagram’s name, so the keyboard doesn’t capitalize it. After you type the first line and pause, Mimir offers Add a line to the diagram. Tap it.

With a hardware keyboard, press Shift-Return instead.

Once the bullet is a diagram, Return starts a new line inside it. To leave, press Return on an empty last line. With the caret at the very start of the diagram, Return adds an empty bullet above it. Longer diagrams are easier to write on a keyboard, or to paste in.

Leave the bullet and the text becomes the drawing. Click the drawing to see and edit its text again.

To bring in a diagram from another tool, copy the text inside its ```mermaid fence, without the fence lines. A fenced diagram stays a code block.

Kinds of diagram

Any kind Mermaid supports works. A few to start with:

First line For
flowchart Steps and decisions. Add LR for left to right or TD for top down.
sequenceDiagram Who sends what to whom, in order.
pie Parts of a whole.
gantt A schedule.
mindmap, timeline Ideas and events.
pie title Where the week went
  "Writing" : 12
  "Meetings" : 6
  "Email" : 4

The first line has to start with the diagram’s name, spelled exactly as Mermaid writes it, with more lines below it. A bullet that only mentions a diagram name in passing stays text.

How a diagram looks

Every diagram uses Mimir’s colors and type. Color instructions in the text, such as style or classDef, are ignored. On a narrow screen, a wide flowchart turns top-down.

Nothing inside a drawing is a link, and a diagram can’t load images.

When a diagram doesn’t draw

If the text has a mistake, the bullet shows the text instead of a drawing. Click it, and a line under the text says what’s wrong and on which line.

A settings block at the top of a diagram, between two --- lines, isn’t supported. A diagram that starts with one stays text. Delete the block to draw it.

In References

When a diagram links to a page, that page’s References show the kind of diagram, such as Flowchart, instead of its text.

Copying, exporting, and sharing a copy

A diagram is the text in its bullet. Copying it, exporting your notes, and searching all use that text.

A shared copy shows the drawing. Click it in the copy to see it larger. A diagram with text masked by tildes shows as its text in the copy, with that text hidden.

Mimir draws diagrams with Pele, an open source library that renders Mermaid diagrams.

Last updated on