mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
docs: added page about flavors
This commit is contained in:
parent
a1bb3e0a9b
commit
8d9b8f2f92
23
docs/flavors.md
Normal file
23
docs/flavors.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
You can use _flavors_ (or presets) to set the preferred options automatically. In this way, Showdown behaves like popular Markdown flavors.
|
||||||
|
|
||||||
|
Currently, the following flavors are available:
|
||||||
|
|
||||||
|
* `original`: Original Markdown flavor as in [John Gruber's spec](https://daringfireball.net/projects/markdown/)
|
||||||
|
* `vanilla`: Showdown base flavor (v1.3.1 onwards)
|
||||||
|
* `github`: [GitHub Flavored Markdown, or GFM](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)
|
||||||
|
|
||||||
|
## Set flavor
|
||||||
|
|
||||||
|
=== "Globally"
|
||||||
|
|
||||||
|
```js
|
||||||
|
showdown.setFlavor('github');
|
||||||
|
```
|
||||||
|
|
||||||
|
=== "Locally"
|
||||||
|
|
||||||
|
```js
|
||||||
|
converter.setFlavor('github');
|
||||||
|
```
|
|
@ -35,4 +35,5 @@ nav:
|
||||||
- Compatibility: compatibility.md
|
- Compatibility: compatibility.md
|
||||||
- Configuration:
|
- Configuration:
|
||||||
- Showdown options: configuration.md
|
- Showdown options: configuration.md
|
||||||
- Available options: available-options.md
|
- Available options: available-options.md
|
||||||
|
- Flavors: flavors.md
|
Loading…
Reference in New Issue
Block a user