Skip to content

Commit

Permalink
Tutorial: show how to add showdown.js
Browse files Browse the repository at this point in the history
  • Loading branch information
brianr committed Aug 30, 2013
1 parent 75aee17 commit 403b087
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,17 @@ By surrounding a JavaScript expression in braces inside JSX (as either an attrib

Markdown is a simple way to format your text inline. For example, surrounding text with asterisks will make it emphasized.

First, add the third-party **Showdown** library to your application. This is a JavaScript library which takes Markdown text and converts it to raw HTML. This requires a script tag in your head (which we have already included in the React playground).
First, add the third-party **Showdown** library to your application. This is a JavaScript library which takes Markdown text and converts it to raw HTML. This requires a script tag in your head (which we have already included in the React playground):

```html{6}
<!-- template.html -->
<head>
<title>Hello React</title>
<script src="http://fb.me/react-{{site.react_version}}.js"></script>
<script src="http://fb.me/JSXTransformer-{{site.react_version}}.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>
</head>
```

Next, let's convert the comment text to Markdown and output it:

Expand Down

0 comments on commit 403b087

Please sign in to comment.