showdown-table

Add markdown table flavor to showdown

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
showdown-table
1811.0.19 years ago9 years agoMinified + gzip package size for showdown-table in KB

Readme

Showdown's Table Extension ========================== Build Status npm version npm version ------ Add markdown table flavor to showdown Adds support for:
| Col 1   | Col 2                                              |
|======== |====================================================|
|**bold** | ![Valid XHTML] (http://w3.org/Icons/valid-xhtml10) |
| Plain   | Value                                              |

Installation

With npm

npm install showdown-table

With bower

bower install showdown-table

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-table.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: ['table']});

Example

```javascript var converter = new showdown.Converter({extensions: 'table'}),
input = '| Col 1   | Col 2                                              |' +
'|======== |====================================================|' +
'|**bold** | ![Valid XHTML] (http://w3.org/Icons/valid-xhtml10) |' +
'| Plain   | Value                                              |';
html = converter.makeHtml(input);
console.log(html);
``` This should output the equivalent to: ```html
<td>Col 1</td>
<td>Col 2</td>
<td><strong>bold</strong></td>
<td><img alt="Valid XHTML" src="http://w3.org/Icons/valid-xhtml10"></td>
<td>Plain</td>
<td>Value</td>
```

License

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