node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

element-markdown

element-markdown

NPM version build status Downloads js-standard-style

A yo-yo component for rendering Markdown with marked.

Intall

$ npm i element-markdown

Usage

var yo = require('yo-yo')
var Markdown = require('element-markdown')
 
function render () {
  var opts = {
    gfm: false
  }
 
  return yo`
    <div>
    ${Markdown('I\'m a [marked](https://github.com/chjj/marked) rendered **markdown** content.', opts)}
    </div>
  `
}
 
var app = render()
document.body.appendChild(app)

API Markdown(source, opts)

  • source - Markdown source String
  • opts - Marked options

Check marked for available options.

License

MIT