Overview
Showdown allows you to load additional functionality via extensions. You can find a list of known Showdown extensions here.
You can also check the boilerplate repo, to create your own extension(s).
Usage
// Using a bundled extension
var showdown = require('showdown');
var converter = new showdown.Converter({ extensions: ['twitter'] });
// Using a custom extension
var mine = require('./custom-extensions/mine');
var converter = new showdown.Converter({ extensions: ['twitter', mine] });
<script src="src/showdown.js"></script>
<script src="src/extensions/twitter.js"></script>
<script>var converter = new showdown.Converter({ extensions: ['twitter'] });</script>
In the CLI tool, use the -e
flag to load an extension.
showdown -e twitter -i foo.md -o bar.html