Skip to content

Commit 7e4573c

Browse files
authored
Update readme.md
1 parent 1b904ca commit 7e4573c

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

readme.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ A simple yet powerful and extensible **React Markdown Editor** that aims to have
2020

2121
npm i react-mde
2222

23-
## Markdown Preview
24-
25-
React-mde is agnostic regarding how to preview Markdown. The examples will use [Showdown](https://github.com/showdownjs/showdown)
26-
27-
npm install showdown
28-
29-
It is also possible to return a Promise to React Element from `generateMarkdownPreview`, which makes
30-
it possible to use [ReactMarkdown](https://github.com/rexxars/react-markdown) as a preview. [View issue](https://github.com/andrerpena/react-mde/issues/161).
31-
3223
## Using
3324

3425
React-mde is a completely controlled component.
@@ -66,6 +57,13 @@ export default function App() {
6657
}
6758
```
6859

60+
## Markdown Preview
61+
62+
React-mde is agnostic regarding how to preview Markdown. The prop `generateMarkdownPreview` should return a Promise of either a string or a `ReactElement`.
63+
- [Demo using Showdown ](https://codesandbox.io/s/react-mde-latest-5i5ov?file=/src/index.js)
64+
- [Demo using ReactMarkdown](https://codesandbox.io/s/react-mde-latest-forked-f9ti5?file=/src/index.js)
65+
66+
6967
### Customizing Icons
7068

7169
React-mde comes with SVG icons extracted from [FontAwesome](https://fontawesome.com/).

0 commit comments

Comments
 (0)