mic
markdown-it-color
npm i markdown-it-color
mic

markdown-it-color

Inline color plugin for markdown-it

by nkjmsss

2.1.1 (see all)License:MITTypeScript:Built-In
npm i markdown-it-color
Readme

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>'

Downloads/wk

642

GitHub Stars

11

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

4

OPEN ISSUES

1

OPEN PRs

6
VersionTagPublished
2.1.1
latest
1yr ago
No alternatives found
No tutorials found
Add a tutorial