mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
parent
7c28d3752c
commit
126de06126
|
@ -108,7 +108,7 @@ Showdown allows additional functionality to be loaded via extensions.
|
||||||
<script src="src/showdown.js" />
|
<script src="src/showdown.js" />
|
||||||
<script src="src/extensions/twitter.js" />
|
<script src="src/extensions/twitter.js" />
|
||||||
|
|
||||||
var converter = new Showdown().converter({ extensions: 'twitter' });
|
var converter = new Showdown.converter({ extensions: 'twitter' });
|
||||||
```
|
```
|
||||||
|
|
||||||
### Server-side Extension Usage
|
### Server-side Extension Usage
|
||||||
|
@ -116,11 +116,11 @@ var converter = new Showdown().converter({ extensions: 'twitter' });
|
||||||
```js
|
```js
|
||||||
// Using a bundled extension
|
// Using a bundled extension
|
||||||
var Showdown = require('showdown');
|
var Showdown = require('showdown');
|
||||||
var converter = new Showdown().converter({ extensions: ['twitter'] });
|
var converter = new Showdown.converter({ extensions: ['twitter'] });
|
||||||
|
|
||||||
// Using a custom extension
|
// Using a custom extension
|
||||||
var mine = require('./custom-extensions/mine');
|
var mine = require('./custom-extensions/mine');
|
||||||
var converter = new Showdown().converter({ extensions: ['twitter', mine] });
|
var converter = new Showdown.converter({ extensions: ['twitter', mine] });
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user