Mermaid in DEVONthink?

Hi all,
Any chance it will be possible to implement Mermaid in DEVONthink?
Thanks!
g

Currently no plans for it.
You likely can link it yourself though there’s no guantee if will function as expected.

1 Like

Here is a simplistic example of using Mermaid in your DEVONthink markdown notes. (The code does not display well in Discourse, so use the attached file which is correctly encoded.)

This example is not guaranteed to travel well and might not work in other markdown editors.

 <body>
  <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
</body>

## This is a sample with Mermaid

```mermaid
sequenceDiagram
    Alice ->> Bob: Hello Bob, how are you?
    Bob-->>John: How about you John?
    Bob--x Alice: I am good thanks!
    Bob-x John: I am good thanks!
    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

    Bob-->Alice: Checking with John...
    Alice->John: Yes... John, how are you?`

1. See [Mermaid installation information](https://mermaid-js.github.io/mermaid/getting-started/n00b-gettingStarted.html)
2. Copy the HTML shown at the top of the markdown text of this note.
3. Use Mermaid syntax inside of a code segment in the note.  The diagram in this note was copied from the **Basic Sequence Diagram** example on the [Mermaid examples page](https://mermaid-js.github.io/mermaid/diagrams-and-syntax-and-examples/examples.html)

How to use Mermaid in DEVONthink markdown.md.zip (1.2 KB)

The document rendered in DEVONthink appears like this (using the CSS from this thread):

5 Likes

You can save the mermaid.min.js in your DEVONthink library. Then in script tag use the devonthink itemm link. It will be very quickly.

Welcome @lain_ding

Yes, this is indeed possible to link to a local copy of the Mermaid,js.

The next release will include a preference to simplify this.

3 Likes

To close the loop on this, Mermaid is now supported in DEVONthink 3.6.2 for Mac, released today. :raised_hands:
Thanks!

2 Likes