You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,15 +20,6 @@ A simple yet powerful and extensible **React Markdown Editor** that aims to have
20
20
21
21
npm i react-mde
22
22
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
-
32
23
## Using
33
24
34
25
React-mde is a completely controlled component.
@@ -66,6 +57,13 @@ export default function App() {
66
57
}
67
58
```
68
59
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
+
69
67
### Customizing Icons
70
68
71
69
React-mde comes with SVG icons extracted from [FontAwesome](https://fontawesome.com/).
0 commit comments