Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markmap-lib

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markmap-lib

Visualize your Markdown as mindmaps with Markmap

  • 0.9.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.7K
increased by0.39%
Maintainers
1
Weekly downloads
 
Created
Source

markmap-lib

NPM License Downloads

Visualize your Markdown as mindmaps.

This project is heavily inspired by dundalek's markmap.

Try it out.

Node.js >= 10 is required.

Installation

$ yarn add markmap-lib
# or
$ npm install markmap-lib

See markmap-cli for command-line usage.

API

Transform

Transform Markdown to markmap data:

import { transform } from 'markmap-lib/dist/transform';

const data = transform(markdown);

Now we get the data for rendering in data.

Render

Render a markmap from transformed data:

Create an SVG element with explicit width and height:

<svg id="markmap" style="width: 800px; height: 800px"></svg>

Render a markmap to the SVG element:

import { Markmap } from 'markmap-lib/dist/view';

Markmap.create('#markmap', null, data);

// or pass an SVG element directly
const svgEl = document.querySelector('#markmap');
Markmap.create(svgEl, null, data);

Keywords

FAQs

Package last updated on 30 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc