markdown-it-linkify-images
A markdown-it plugin to add links to images
Linkifying Images plugin for markdown-it markdown parser.
Install
node.js, browser:
npm install markdown-it-linkify-images --save
bower install markdown-it-linkify-images --save
Use
var md = require('markdown-it')()
var mili = require('markdown-it-linkify-images')
md.use(mili)
var html = md.render('')
html
md.use(mili, {
target: '_blank',
linkClass: 'custom-link-class',
imgClass: 'custom-img-class'
})
var html = md.render('')
html
Differences in browser. If you load script directly into the page, without a package system, the module will add itself globally as window.markdownitLinkifyImages
.
Testing
This plugin is tested against markdown-it @ 6,7,8 and latest
License
MIT