# Mindmap with markmap.js

**URL:** https://community.silverbullet.md/t/mindmap-with-markmap-js/1556
**Category:** Plugs and Libraries
**Created:** [December 31, 2024, 8:39am UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556 "2024-12-31T08:39:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [December 31, 2024, 8:39am UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/1 "2024-12-31T08:39:39Z")

</div>

Hi I have created my first [plugin](https://github.com/malys/silverbullet-mindmap).  
It converts markdown to beautiful mindmap.

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [January 7, 2025, 4:47pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/2 "2025-01-07T16:47:46Z")

</div>

I have changed build to every month change embedded libraries to lastest specific version (see [tags](https://github.com/malys/silverbullet-mindmap/tags)

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [January 7, 2025, 7:09pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/3 "2025-01-07T19:09:27Z")

</div>

Super cool!

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [January 14, 2025, 5:01pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/4 "2025-01-14T17:01:27Z")

</div>

plug supports: internal links syntaxes [] or[[|]]

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [March 16, 2025, 9:39am UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/5 "2025-03-16T09:39:25Z")

</div>

Support of dark mode

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [December 21, 2025, 4:11pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/6 "2025-12-21T16:11:45Z")

</div>

Migration to space-lua.

🛠 Installation  
Navigate to your Library Manager inside Silverbullet  
Add my repository: [silverbullet-libraries/Repositories/malys.md at main · malys/silverbullet-libraries · GitHub](https://github.com/malys/silverbullet-libraries/blob/main/Repositories/malys.md)  
Install [silverbullet-libraries/src/MarkmapMindmap.md at main · malys/silverbullet-libraries · GitHub](https://github.com/malys/silverbullet-libraries/blob/main/src/MarkmapMindmap.md)

![markmap](https://community.silverbullet.md/uploads/default/original/2X/4/493e4db01035bc5d0ef5189f8f502ac7fc449709.gif)

---

<div class="post-metadata">

### Author: ![kaiser2k20](https://community.silverbullet.md/user_avatar/community.silverbullet.md/kaiser2k20/32/2248_2.png) [@kaiser2k20](https://community.silverbullet.md/u/kaiser2k20)
#### Post date: [December 21, 2025, 6:01pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/7 "2025-12-21T18:01:30Z")

</div>

I am getting

> Library frontmatter validation error: must have required property ‘name’

error notification when doing `install from URI` (or the install button) in Library Manager. Library is not copied to `Library/Malys`.

Github page for `MarkmapMindmap.md` shows

> Error in user YAML: (): did not find expected key while parsing a block mapping at line 1 column 1

Other libraries with this YAML error (like Marpslides) fail the same. Libraries without it install just fine.

This is happening on silverbullet-server-windows-x86\_64 binary, 2.3.0.

---

<div class="post-metadata">

### Author: ![bau](https://community.silverbullet.md/user_avatar/community.silverbullet.md/bau/32/2597_2.png) [@bau](https://community.silverbullet.md/u/bau)
#### Post date: [December 21, 2025, 6:06pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/8 "2025-12-21T18:06:05Z")

</div>

Interesting !  
What caused me a problem:

- the code uses your [utilities.md](http://utilities.md) (which must therefore be installed)
- the path to configure includes the name of the file without its extension (not explicit enough in the doc)
- I use `Treeview_Extension_DragAndResize` from @Mr.Red which sets the size of the Panel. The ideal would be to transpose the DragAndResize functions and manage the visibility state of the Panel before opening Mindmap (exemple : TreeView already open)

Any way, thanks for sharing!

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [December 21, 2025, 7:15pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/9 "2025-12-21T19:15:06Z")

</div>

try again.

---

<div class="post-metadata">

### Author: ![kaiser2k20](https://community.silverbullet.md/user_avatar/community.silverbullet.md/kaiser2k20/32/2248_2.png) [@kaiser2k20](https://community.silverbullet.md/u/kaiser2k20)
#### Post date: [December 21, 2025, 7:18pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/10 "2025-12-21T19:18:13Z")

</div>

Success!  
So hyperlink in frontmatter is a problem?

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [December 21, 2025, 7:30pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/11 "2025-12-21T19:30:56Z")

</div>

A surprise but yes, it was the problem.

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [December 21, 2025, 7:48pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/12 "2025-12-21T19:48:01Z")

</div>

docs improved and I have changed code to manage missing dependency alert.

---

<div class="post-metadata">

### Author: ![bau](https://community.silverbullet.md/user_avatar/community.silverbullet.md/bau/32/2597_2.png) [@bau](https://community.silverbullet.md/u/bau)
#### Post date: [December 21, 2025, 9:40pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/13 "2025-12-21T21:40:18Z")

</div>

About its extension ( **Treeview\_Extension\_DragAndResize** ) @Mr.Red [write](https://github:Mr-xRed/silverbullet-libraries/Treeview_Extension_DragAndResize.md) :

> This is essentially a two-panel windowing system built on top of elements never intended for it.

To use its system, simply execute the js code after calling the Panel like this:

```auto
command.define {
  name = "Markmap: Toggle Move&Resize",
  key = "Ctrl-Alt-m",
  mac = "Cmd-Alt-m",
  run = function()
        editor.invokeCommand "Markmap: Toggle preview"
        js.import("/.fs/Library/Mr-xRed/PanelDragResize.js").enableDrag()
       end
} 

```

⚠ To close the Panel: Ctrl + Alt + m (cursor outside the Panel)

The extension remembers dimensions and position of the last execution. However, since the Panel is shared (exemple: the TreeView), a manual adjustment may be necessary.

 ![2025-12-21 API](https://community.silverbullet.md/uploads/default/original/2X/0/0550ebab81e68a6c685249564e2570355420962e.png)

---

<div class="post-metadata">

### Author: ![Mr.Red](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mr.red/32/821_2.png) [@Mr.Red](https://community.silverbullet.md/u/Mr.Red)
#### Post date: [December 22, 2025, 8:40pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/15 "2025-12-22T20:40:23Z")

</div>

Just a heads up. I updated the Drag&Resize Extension. And fixed a major bug.  
Here is the latest [ChangeLog](https://community.silverbullet.md/t/proof-of-concept-floating-widgets-example-treeview-orbitcal-calendar/3442/18).

---

<div class="post-metadata">

### Author: ![bau](https://community.silverbullet.md/user_avatar/community.silverbullet.md/bau/32/2597_2.png) [@bau](https://community.silverbullet.md/u/bau)
#### Post date: [December 23, 2025, 8:35am UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/16 "2025-12-23T08:35:11Z")

</div>

The plugin works really well with @Mr.Red’s Drag&Resize Extension!

For greater ease of use, I made three mini adjustments:

- Print button (and event beforeprint): removed (in Firefox, to print the frame: right button).
- Markmap toolbar: positioned at the top left
- Markmap toolbar: brand removed (logo + label). To do this, add:

```auto
const brandLink = document.querySelector('.mm-toolbar-brand');
if (brandLink) {
  brandLink.remove();
};

```

in the js template, after `document.body.appendChild(el);`.

Combined with the resizing of the floating panel, we obtain a more spacious drawing surface.

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [December 23, 2025, 9:02am UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/17 "2025-12-23T09:02:50Z")

</div>

Thanks to community contributions, SB ecosystem has so rich then never.

---

<div class="post-metadata">

### Author: ![rharmonson](https://community.silverbullet.md/user_avatar/community.silverbullet.md/rharmonson/32/1038_2.png) [@rharmonson](https://community.silverbullet.md/u/rharmonson)
#### Post date: [December 28, 2025, 9:13pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/18 "2025-12-28T21:13:33Z")

</div>

Finally, getting around to setting this up after upgrading from 1.x. I had dark mode working with 1. x but dark mode is eluding me with 2.3.0. I am am sure that I am the problem.

Anyone provide an example of their CONFIG where it defaults to dark mode? Toggling dark mode doesn’t do anything on my end and a refresh closes the preview with light mode being defaulted.

---

<div class="post-metadata">

### Author: ![malys](https://community.silverbullet.md/user_avatar/community.silverbullet.md/malys/32/840_2.png) [@malys](https://community.silverbullet.md/u/malys)
#### Post date: [December 29, 2025, 1:41pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/19 "2025-12-29T13:41:57Z")

</div>

I use these themes:  
Library/xczphysics/STYLE/Theme/Doom-Two  
Library/Malys/Theme/theme-malys  
Use Library manager ([GitHub - malys/silverbullet-libraries: Malys SilverBullet libraries](https://github.com/malys/silverbullet-libraries))

---

<div class="post-metadata">

### Author: ![rharmonson](https://community.silverbullet.md/user_avatar/community.silverbullet.md/rharmonson/32/1038_2.png) [@rharmonson](https://community.silverbullet.md/u/rharmonson)
#### Post date: [December 29, 2025, 3:40pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/20 "2025-12-29T15:40:51Z")

</div>

Thank you. I will review your themes and look for the mindmap specific items to add to my [theme](https://community.silverbullet.md/t/tokyonight-light-and-dark-theme/3556).

---

<div class="post-metadata">

### Author: ![rharmonson](https://community.silverbullet.md/user_avatar/community.silverbullet.md/rharmonson/32/1038_2.png) [@rharmonson](https://community.silverbullet.md/u/rharmonson)
#### Post date: [December 30, 2025, 2:18pm UTC](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556/21 "2025-12-30T14:18:26Z")

</div>

I put the following in CONFIG (space-lua). Is this correct?

```auto
config.set("markmap.source","Library/Malys/MarkmapMindmap")

```

SilverBullet v2.3.0.

As I recollect, setting this up was relatively painless except for the text in darkmode which you fixed at my request. Feel like I am missing the obvious. It is not working as expected. 😑

[Next page](https://community.silverbullet.md/t/mindmap-with-markmap-js/1556.md?page=2)
