@gerhobbelt/markdown-it-inline-text-color

1.0.1-1 • Public • Published

markdown-it-inline-text-color

Build Status NPM version Coverage Status

Wraps text with a <span> setting color attribute markdown-it markdown parser.

v1.+ requires markdown-it v4.+, see changelog.

'{color:red}red{color} light {color:yellow}yellow{color} light {color:green}green{color} light' => <span style="color:red;">red</span> light<span style="color:yellow;">yellow</span> light <span style="color:green;">green</span> light

Markup is based on Confluence wiki advanced text formatting

Install

node.js:

npm install markdown-it-inline-text-color --save

Use

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

md.render('{color:red}red{color} light {color:yellow}yellow{color} light {color:green}green{color} light') => <p><span style="color:red;">red</span> light <span style="color:yellow;">yellow</span> light <span style="color:green;">green</span> light</p>

License

MIT

Package Sidebar

Install

npm i @gerhobbelt/markdown-it-inline-text-color

Weekly Downloads

9

Version

1.0.1-1

License

MIT

Unpacked Size

38.4 kB

Total Files

13

Last publish

Collaborators

  • gerhobbelt