Skip to content

Provides inline <span style="color:<value>;">CONTAINTED TEXT</span> for markdown-it

Notifications You must be signed in to change notification settings

ScopiCisco/markdown-it-inline-text-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Provides inline <span style="color:<value>;">CONTAINTED TEXT</span> for markdown-it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published