@mind-elixir/export-xmind
is a plugin of mind-elixir-core. You can use @mind-elixir/export-xmind
to export a .xmind
file.
npm i @mind-elixir/export-xmind jszip file-saver
import MindElixir from 'mind-elixir'
import exportXmind from '@mind-elixir/export-xmind'
const mind = new MindElixir(options)
mind.install(exportXmind)
mind.init(data)
const blob = await mind.exportXmind() // get blob
mind.exportXmindFile(fileName) // download file
import { data2Xmind } from '@mind-elixir/export-xmind'
// use this way to avoid creating instance
const blob = await data2Xmind(JSON.parse(JSON.stringify(data))) // data returned by getData()