mil

markdown-it-link-target

A markdown-it plugin to make all links open in a new window

Showing:

Popularity

Downloads/wk

182

GitHub Stars

6

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
This package has been deprecated. Use markdown-it-link-attributes instead.

Readme

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.

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial