showdown-target-blank

1.0.2 • Public • Published

Showdown's Target Blank Extension

Target Blank extension for showdown

Adds support for:

[somelink](https://some.url.com/some/path) -> <a target="_blank" href="..." >somelink</a>

Installation

With npm

npm install showdown-target-blank

With bower

bower install showdown-target-blank

Manual

You can also download the latest release zip or tarball and include it in your webpage, after showdown:

<script src="showdown.min.js">
<script src="showdown-target-blank.min.js">

Enabling the extension

After including the extension in your application, you just need to enable it in showdown.

var converter = new showdown.Converter({extensions: ['targetblank']});

Example

var converter = new Showdown.converter({extensions: ['targetblank']}),
    input = 'This is a [link](http://www.example.com)',
    html = converter.makeHtml(input);
    console.log(html);

This should output:

<p>This is a <a target="_blank" href="http://example.com">link</a></p>

License

These files are distributed under BSD license. For more information, please check the LICENSE file in the source code.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    27
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    27
  • 1.0.0
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i showdown-target-blank

Weekly Downloads

27

Version

1.0.2

License

BSD

Last publish

Collaborators

  • stefanobrilli