mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Updated README with new inclusion syntax
This commit is contained in:
parent
05453b5042
commit
22056db9a7
15
README.md
15
README.md
|
@ -116,22 +116,23 @@ Showdown allows additional functionality to be loaded via extensions.
|
|||
<script src="src/showdown.js" />
|
||||
<script src="src/extensions/twitter.js" />
|
||||
|
||||
var converter = new Showdown().converter({
|
||||
extensions: [
|
||||
Showdown.extensions.twitter
|
||||
]
|
||||
})
|
||||
var converter = new Showdown().converter({ extensions: 'twitter' });
|
||||
```
|
||||
|
||||
### Server-side Extension Usage
|
||||
|
||||
```js
|
||||
// Using a bundled extension
|
||||
var Showdown = require('showdown');
|
||||
var twitter = Showdown.extensions.twitter;
|
||||
var converter = new Showdown().converter({ extensions: [twitter] });
|
||||
var converter = new Showdown().converter({ extensions: ['twitter'] });
|
||||
|
||||
// Using a custom extension
|
||||
var mine = require('./custom-extensions/mine');
|
||||
var converter = new Showdown().converter({ extensions: ['twitter', mine] });
|
||||
```
|
||||
|
||||
|
||||
|
||||
Known Differences in Output
|
||||
---------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user