Neutered Paranoid Meerkat

    markdown-it-color
    TypeScript icon, indicating that this package has built-in type declarations

    2.1.1 • Public • Published

    markdown-it-color

    install

    npm install markdown-it-color --save

    use

    var md = require('markdown-it')()
                .use(require('markdown-it-color'))

    API

    You can add options. Default option is below.

    var md = require('markdown-it')()
                .use(require('markdown-it-color'), {
                  defaultClassName: 'md-colorify', // default
                  inline: false, // default
                })
    
    md.render('{primary}(sample)') // => '<span class="md-colorify md-colorify--primary">sample</span>'

    If you want to use inline style, use like below.

    var md = require('markdown-it')()
                .use(require('markdown-it-color'), {
                  inline: true,
                })
    
    md.render('{red}(sample)') // => '<span class="md-colorify md-colorify--red" style="color: red;">sample</span>'

    Install

    npm i markdown-it-color

    DownloadsWeekly Downloads

    417

    Version

    2.1.1

    License

    MIT

    Unpacked Size

    10.7 kB

    Total Files

    16

    Last publish

    Collaborators

    • nkjmsss