JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q5290F
  • License MIT

creates dom nodes from markdown

Package Exports

  • belmark

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (belmark) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

belmark

creates dom nodes from markdown

usage

npm install belmark

var belmark = require('belmark')
var markdown = `
  # Hello
  * world
`
var opts = { gfm: false }
/****************************
  as function call
****************************/
var el   = belmark.call(opts, markdown)
// or with default `opts`
var el   = belmark(markdown)
document.body.appendChild(el)
/****************************
  as tagged template
****************************/
var el2 = belmark.bind(opts)`
  # Hello
  * world
`
// or with default `opts`
var el2 = belmark`
  # Hello
  * world
`
document.body.appendChild(el2)

for more details see: demo

api

var element = belmark.call(opts, source)

  • source - Markdown source String
  • opts - options object for marked provided as this param
    • check marked for available options

related

inspiration came from