virtual-markdown
Convert markdown into virtual-dom
Last updated 5 years ago by yoshuawuyts .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install virtual-markdown 
SYNC missed versions from official npm registry.

virtual-markdown stability

npm version build status test coverage downloads js-standard-style

Convert markdown into virtual-dom. Uses remark and remark-html under the hood.

Installation

$ npm install virtual-markdown

Usage

const highlight = require('mdast-highlight')
const md = require('virtual-markdown')

module.exports = render

function render (h) {
  const text = `
    # funky town, get down, get down
    - or how I learned to love the bomb
  `

  return h('section.main', [
    md(text, {
      use: [ highlight ],
      footnotes: true
    })
  ])
}

API

tree = md(markdown, opts?)

Takes a string of markdown and returns a virtual-dom widget. Takes the following options:

See Also

License

MIT

Current Tags

  • 2.0.0                                ...           latest (5 years ago)

4 Versions

  • 2.0.0                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |