Skip to content

Commit c410fcb

Browse files
committed
add markdown example
1 parent fd2674f commit c410fcb

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

examples/firebase/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<title></title>
4+
<title>Vue.js Firebase example</title>
55
<meta charset="utf-8">
66
<link rel="stylesheet" type="text/css" href="style.css">
77
<script src='https://cdn.firebase.com/js/client/1.0.23/firebase.js'></script>

examples/markdown/index.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Vue.js markdown editor example</title>
6+
<link rel="stylesheet" href="style.css">
7+
<script src="../../dist/vue.js"></script>
8+
<script src="http://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js"></script>
9+
</head>
10+
<body>
11+
12+
<div id="editor">
13+
<textarea v-model="input"></textarea>
14+
<div v-html="input | marked"></div>
15+
</div>
16+
17+
<script>
18+
new Vue({
19+
el: '#editor',
20+
data: {
21+
input: '# hello'
22+
},
23+
filters: {
24+
marked: marked
25+
}
26+
})
27+
</script>
28+
29+
</body>
30+
</html>

examples/markdown/style.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
html, body, #editor {
2+
margin: 0;
3+
height: 100%;
4+
font-family: 'Helvetica Neue', Arial, sans-serif;
5+
color: #333;
6+
}
7+
8+
textarea, #editor div {
9+
display: inline-block;
10+
width: 49%;
11+
height: 100%;
12+
vertical-align: top;
13+
-webkit-box-sizing: border-box;
14+
-moz-box-sizing: border-box;
15+
box-sizing: border-box;
16+
padding: 0 20px;
17+
}
18+
19+
textarea {
20+
border: none;
21+
border-right: 1px solid #ccc;
22+
resize: none;
23+
outline: none;
24+
background-color: #f6f6f6;
25+
font-size: 14px;
26+
font-family: 'Monaco', courier, monospace;
27+
padding: 20px;
28+
}
29+
30+
code {
31+
color: #f66;
32+
}

0 commit comments

Comments
 (0)