trilium icon indicating copy to clipboard operation
trilium copied to clipboard

can add a mind map feature?

Open jan-bar opened this issue 3 years ago • 6 comments
trafficstars

Describe feature

Since I'm not familiar with js, I found a mind map project and used trilium to configure a read-only mind map note.

This library supports editing nodes, but I feel that I need to use the front-end and back-end api functions of trilium, which I am not familiar with, so I hope the official add the function of mind map notes.

image

Here are my exported notes:mind.zip

The official css needs to annotate this configuration before it can be displayed to trilium normally

image

By reading the wiki need to add #appCss tag for css

image

The reason why it is read-only is because I have written data here.

image

image

image

Now I convert xmind to the required json format data in the following way, and get a read-only mind map note in the above way. go run main.go -s my.xmind -d my.json

package main

import (
	"flag"
	"os"

	"github.com/jan-bar/xmind"
)

func main() {
	xm := flag.String("s", "", "src xmind file")
	js := flag.String("d", "", "dst json file")
	flag.Parse()

	st, err := xmind.LoadFile(*xm)
	if err != nil {
		panic(err)
	}

	var data []byte
	err = xmind.SaveCustom(st.Topics[0], "id", "topic", "parentid", "isroot,1", &data, xmind.CustomIncrId())
	if err != nil {
		panic(err)
	}

	err = os.WriteFile(*js, data, os.ModePerm)
	if err != nil {
		panic(err)
	}
}

Additional Information

I switched from other note-taking software to trilium, because the previous note-taking software has a mind map function, so I am not used to it, but the trilium function is very useful, especially script notes, but my JavaScript learning is not very deep, I hope the author can refer to , add mind map notes, thank you very much.

jan-bar avatar Aug 31 '22 09:08 jan-bar

Something like this is already similar with Mermaid graphs: https://github.com/zadam/trilium/pull/2187

Have you tried implementing a mind map within a Mermaid graph?

sigaloid avatar Aug 31 '22 12:08 sigaloid

@sigaloid This is indeed a solution, but it cannot be edited in a faster way on the node. I feel like I can write a way to convert from Xmind to Mermaid graphs.

jan-bar avatar Sep 01 '22 01:09 jan-bar

@jan-bar hi bro, are there trilium plugins available

banjuer avatar Mar 24 '24 09:03 banjuer

@jan-bar hi bro, are there trilium plugins available

No, you can refer to the project above and the plan I gave. I don’t know much about JavaScript.

jan-bar avatar Mar 24 '24 11:03 jan-bar

@jan-bar hi bro, i found one, try this: https://github.com/waterovo/trilium-jsmind awesome

banjuer avatar Apr 26 '24 09:04 banjuer

@jan-bar hi bro, i found one, try this: https://github.com/waterovo/trilium-jsmind awesome

Thanks for the recommendation, it looks good

jan-bar avatar Apr 26 '24 10:04 jan-bar

Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: https://github.com/TriliumNext/Notes/issues/132

meichthys avatar May 09 '24 03:05 meichthys