1.0.2 • Published 8 years ago
markdown-it-link-target v1.0.2
markdown-it-link-target
Deprecated: Use markdown-it-link-attributes instead
Link target plugin for markdown-it markdown parser.
Install
node.js, browser:
npm install markdown-it-link-target --save
bower install markdown-it-link-target --save
Use
var md = require('markdown-it')()
var milt = require('markdown-it-link-target')
// Basic Use
md.use(milt)
var html = md.render('![link](https://google.com)')
html // <p><a href="https://google.com" target="_blank">link</a></p>
// With Custom Configuration
md.use(milt, {
target: '_top',
})
var html = md.render('![link](https://google.com)')
html // <p><a href="https://google.com" target="_top">link</a></p>
Differences in browser. If you load script directly into the page, without a package system, the module will add itself globally as window.markdownitLinkTarget
.