New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

markdown-it-link-target

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-link-target

A markdown-it plugin to configure the target attribute for links

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
94
3.3%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

markdown

FAQs

Package last updated on 26 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts