zzzze / markdown-it-style

A markdown-it plugin - add style to your markdwon
MIT License
1 stars 1 forks source link

markdown-it-style

This is a plugin for the markdown-it markdown parser. It can add style to the result html elements.

Install

npm install markdown-it-style --save-dev

or, if using yarn

yarn add -D markdown-it-style

Use

var Markdown = require('markdown-it')
var markdowStyle = require('markdown-it-style)
var md = new Markdown()
md.use(markdownStyle, {
  'h1': 'font-size:18px;color:red'
})
md.render('# hello world')  // ===> <h1 style="font-size:18px;color:red">hello world<h1>