@gerhobbelt/markdown-it-inline-text-color
v1.0.1-1
Published
Provides inline <span style="color:<value>;">CONTAINTED TEXT</span> for markdown-it
Downloads
35
Maintainers
Readme
markdown-it-inline-text-color
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>