Github 地址: https://github.com/ssshooter/mind-elixir-core
试用地址: https://mindelixir.ink/
Mind elixir 是一个免费开源的思维导图内核
https://mindelixir.ink/#/
npm i mind-elixir -S
import MindElixir, { E } from 'mind-elixir'
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mind-elixir.js"></script>
<div class="outer"> <div id="map"></div> </div> <style> .outer { position: relative; margin: 50px; } #map { height: 500px; width: 100%; overflow: auto; } </style>
let mind = new MindElixir({ el: '#map', direction: MindElixir.LEFT, data: MindElixir.new('new topic'), // 也可以把 getDataAll 得到的数据初始化 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')
mind.getAllData() // see src/example.js
direction 选项可选 MindElixir.LEFT
、MindElixir.RIGHT
和 MindElixir.SIDE
。
挂载的目标需要定宽高,可以是百分百;外层元素建议设置 position: relative;
,否则菜单位置以视窗为标准分布。
在使用节点操作方法时需要传入的参数可以借助 E
函数获得。
mind.insertSibling(E('bd4313fbac40284b'))
https://inspiring-golick-3c01b9.netlify.com/
hotkeys-js
![]() | 1 ankazen 2019-08-01 09:43:20 +08:00 非常棒,完成度很高 |
![]() | 2 azssjli 2019-08-01 10:00:35 +08:00 试了下,发现触摸板移动,只能上下左右,不能左上左下,或任意角度移动,不算这个其他都挺好了,给个赞 |
![]() | 3 tt67wq 2019-08-01 10:22:19 +08:00 ![]() 我擦 以为是个 elixir 的项目,原来不是 |
![]() | 4 ssshooter OP |
![]() | 5 kokdemo 2019-08-01 11:14:22 +08:00 赞,我想想怎么做成 hugo 的插件 |
![]() | 6 ZiLong 2019-08-01 11:55:13 +08:00 非常棒 |
7 zaynex 2019-08-01 13:01:28 +08:00 赞,专注模式很有意思! |
![]() | 8 NUT 2019-08-01 14:04:05 +08:00 如果导出可以搞成 Markdown 就好了。 |
![]() | 9 everettjf 2019-08-01 14:47:48 +08:00 给力 |
![]() | 11 viperasi 2019-08-01 15:53:01 +08:00 好东西,码云上也来一份吧。 |
12 jorneyr 2019-08-01 17:38:44 +08:00 看上去很不错 |
13 MonoBiao 2019-08-01 17:49:41 +08:00 看起来不错,赞一个 |
14 noli 2019-08-01 18:23:03 +08:00 问个可能离题的问题,Elixir 是什么意思? |
![]() | 15 ipwx 2019-08-01 18:27:48 +08:00 It would be fantastic if you support MathJax/KaTeX. |
16 Mitt 2019-08-01 18:43:44 +08:00 @ssshooter macbook 触控板也只能四相移动,只是 macbook 的触控板比较灵活感觉好像可以八相,但实际上移动是先平移后上移的 |
![]() | 17 ssshooter OP ![]() |
18 jorneyr 2019-08-01 21:27:18 +08:00 Mac Safari 不能编辑,Mac Chrome 可以编辑,但是编辑的体验很不好,编辑框和内容没有完全重叠。 |
![]() | 20 haozes 2019-08-02 11:31:40 +08:00 思维导图的工具实在太多,而且好用的也不少。这方面没太多需求。但画流程图,像 https://www.processon.com/ 这样的画流程图,代替 VISIO ( VISIO 不能跨平台)这种,很少而且收费,期待楼主考虑下这种 |
![]() | 21 ssshooter OP @haozes emmm 其实也不是主推在线思维导图服务,而是希望这个项目能让前端开发者方便地在自己的项目使用思维导图 |
![]() | 22 netnr 2019-08-02 14:17:23 +08:00 |