Code Monkey home page Code Monkey logo

markmap's Introduction

markmap

Build status on CircleCI npm version

Markmap is a javascript component that will visualize your markdown documents as mindmaps. It is useful for better navigation and overview of the content. You can see it in action online here. It is also used in an extension for Atom editor.

markmap in action markmap in action
Default style Colorful style

Features

  • Zoom in and out with the mouse wheel.
  • Pan around by dragging the background.
  • Expand/collapse children of a node by clicking on the circle.

Supported formats:

  • Markdown
  • MindMup
  • Txtmap (whitespace indented plaintext)
  • Pandoc (limited prototype)

Suggestions for new features are welcome, feel free to open an issue.

How to use

Install the component with NPM:

npm install markmap

Visualizing a markdown text consists of two steps:

  1. The text is parsed and transformed into a tree representation.
  2. The tree is rendered.

Examples

To run the examples first clone the project and install dependencies:

git clone https://github.com/dundalek/markmap.git
cd markmap
npm install

In the examples code there are imports like require('../../lib/somefile'). When using this library in your project you need to change those to require('markmap/lib/somefile').

Browser

Run npm start and a browser will open with the example page where you can see how different formats are parsed and displayed. The source code for browser examples is located in examples/browser folder.

Node.js

Node examples are located in examples/node. You can run the markdown example or others as follows:

cd examples/node
node example.markdown.js

Changelog

0.6.1 (2019-10-23)

  • Bump dependencies to fix vulnerabilities

0.6.0 (2018-11-08)

  • Breaking change: Moved sources from src to lib. That way there will be no breakage if we happen to introduce babel in the future.
  • Added tree diffing heuristic
  • Added more code examples
  • Fixed link parsing issues

0.5.0 (2018-09-10)

  • Breaking change: Changed structure of source files
  • Added support for parsing inter file links for markdown
  • Updated code examples

License

The MIT License.

markmap's People

Contributors

dundalek avatar khanhicetea avatar 0xflotus avatar edjopato avatar luddek avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.