Skip to content

AgentBUB/markdown-it-color-inline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown-it-color-inline

After a lot of working, starting with a fork, then making my own package, I got my first npm package running. I made this to work on my SvelteKit project because the ones I tried just errored out in production, so here we are. Shout out to nkjmsss and yusu79 as those package/creators are what I used to peace together this. I did a little copy & paste from both, so please do go view their amazing work.

Install

npm i markdown-it-color-inline --save

Usage

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

or

import markdownItColorInline from 'markdown-it-color-inline';

const md = new MarkdownIt().use(markdownItColor);

Render

md.render('{red}(sample)'); // => '<span id="md-convert" style="color: red;">sample</span>'

If I learn how npm packages work better, I will add a config for the id.

About

Inline style color plugin for markdown-it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •