mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
docs: add mention to makeMd() to reamde.md
This commit is contained in:
parent
e4b0e69724
commit
a894a0e1db
18
README.md
18
README.md
|
@ -106,6 +106,7 @@ Check our [wiki pages][wiki] for examples and a more in-depth documentation.
|
||||||
|
|
||||||
### Node
|
### Node
|
||||||
|
|
||||||
|
**Markdown to HTML**
|
||||||
```js
|
```js
|
||||||
var showdown = require('showdown'),
|
var showdown = require('showdown'),
|
||||||
converter = new showdown.Converter(),
|
converter = new showdown.Converter(),
|
||||||
|
@ -113,12 +114,21 @@ var showdown = require('showdown'),
|
||||||
html = converter.makeHtml(text);
|
html = converter.makeHtml(text);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**HTML to Markdown**
|
||||||
|
```js
|
||||||
|
var showdown = require('showdown'),
|
||||||
|
converter = new showdown.Converter(),
|
||||||
|
html = '<a href="https://patreon.com/showdownjs">Please Support us!</a>',
|
||||||
|
md = converter.makeMarkdown(text);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Browser
|
### Browser
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var converter = new showdown.Converter(),
|
var converter = new showdown.Converter(),
|
||||||
text = '# hello, markdown!',
|
html = converter.makeHtml('# hello, markdown!'),
|
||||||
html = converter.makeHtml(text);
|
md = converter.makeMd('<a href="https://patreon.com/showdownjs">Please Support us!</a>');
|
||||||
```
|
```
|
||||||
|
|
||||||
### Output
|
### Output
|
||||||
|
@ -129,6 +139,10 @@ Both examples should output...
|
||||||
<h1 id="hellomarkdown">hello, markdown!</h1>
|
<h1 id="hellomarkdown">hello, markdown!</h1>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```md
|
||||||
|
[Please Support us!](https://patreon.com/showdownjs)
|
||||||
|
```
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
You can change some of showdown's default behavior through options.
|
You can change some of showdown's default behavior through options.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user