@samitouri / QOS-React-2 / commits / 403b087e97

Tutorial: show how to add showdown.js

Brian Rue committed Aug 30, 2013 at 16:29 UTC 403b087e97618299ee3dafd0ca2a292f3c3e60d1
1 file changed +11 -1
docs/docs/tutorial.md
+11 -1
@@ -203,7 +203,17 @@ By surrounding a JavaScript expression in braces inside JSX (as either an attrib
203
204 Markdown is a simple way to format your text inline. For example, surrounding text with asterisks will make it emphasized.
205
206 -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).
206 +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):
207 +
208 +```html{6}
209 +<!-- template.html -->
210 +<head>
211 + <title>Hello React</title>
212 + <script src="http://fb.me/react-{{site.react_version}}.js"></script>
213 + <script src="http://fb.me/JSXTransformer-{{site.react_version}}.js"></script>
214 + <script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script>
215 +</head>
216 +```
217
218 Next, let's convert the comment text to Markdown and output it:
219