markdown-it-color-inline

1.9.5 • Public • Published

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.

Package Sidebar

Install

npm i markdown-it-color-inline

Weekly Downloads

0

Version

1.9.5

License

MIT

Unpacked Size

5.17 kB

Total Files

5

Last publish

Collaborators

  • agent-bub