mindelixir logo

version license

Mind elixir is a free open source mind map core.

中文

Use now

mindelixir

https://mindelixir.ink/#/

Try it in codepen

https://codepen.io/ssshooter/pen/GVQRYK

Use in your project

Install

NPM

npm i mind-elixir -S
import MindElixir, { E } from 'mind-elixir'

Script tag

<script src="https://cdn.jsdelivr.net/npm/mind-elixir/dist/mind-elixir.js"></script>

HTML structure

<div class="outer">
  <div id="map"></div>
</div>
<style>
  .outer {
    position: relative;
    margin: 50px;
  }
  #map {
    height: 500px;
    width: 100%;
    overflow: auto;
  }
</style>

Init

let mind = new MindElixir({
  el: '#map',
  direction: MindElixir.LEFT,
  // create new map data
  data: MindElixir.new('new topic'),
  // or set as data that is return from `.getAllData()`
  data: {...},
  draggable: true, // default true
  contextMenu: true, // default true
  toolBar: true, // default true
  nodeMenu: true, // default true
  keypress: true, // default true
})
mind.init()

// get a node
E('node-id')

Data Export

mind.getAllData()
// see src/example.js

Doc

https://inspiring-golick-3c01b9.netlify.com/

Dependency

hotkeys-js