Created
June 1, 2021 23:42
-
-
Save ch1nux/6bec123b69d5b18b74543bdfae409110 to your computer and use it in GitHub Desktop.
This is the placeholder of the 2nd FreeCodeCamp exercise "Markdown Previewer"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
 | |
# Welcome! | |
## This is my Markdown Previewer | |
This was set on [React](https://reactjs.org/) and [Marked.js](https://github.com/markedjs/marked), a pretty good **Javascript** library for parsing Markdown into HTML. | |
### Installation | |
- If you're using **Vanilla Javascript**, you can use the ES Module version: | |
```javascript | |
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> | |
``` | |
- If you' re using **Node.js** or **React**, you can install it: | |
```shell | |
npm install marked | |
``` | |
- Then, you can import it to your code: | |
```javascript | |
import marked from marked | |
``` | |
`marked` It's a function that can receive two params, one required and one optional. You can check details in their [amazing documentation](https://marked.js.org/) (which is also rendered entirely from Markdown!) | |
### Usage | |
marked, by default, can render [Github Flavored Markdown](https://github.github.com/gfm/): | |
```javascript | |
marked('> This is a blockquote') | |
``` | |
Will render this: | |
> This is a blockquote |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment