forked from manshar/grande.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (65 loc) · 2.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!doctype html>
<html>
<head>
<title>grande.js</title>
<meta charset="utf-8">
<meta name="description" content="grande.js: a way for you to express yourself">
<link href="css/menu.css" rel="stylesheet">
<link href="css/editor.css" rel="stylesheet">
</head>
<body class="g-body">
<a href="https://github.com/mduvall/grande.js"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png" alt="Fork me on GitHub"></a>
<section>
<article class="content rich-editor">
<h1>Welcome, this is grande.js</h1>
<blockquote>"Make every detail perfect and limit the number of details to perfect." - <span class="jack">Jack Dorsey</span></blockquote>
<p>Style your text to how you <b>think</b> and put the <i>feeling</i> into your words. Just select any text and choose how you want it to look from the menu.</p>
<ul>
<li>Create a bulleted list simply by typing "- " or "* " and hitting enter</li>
</ul>
<ol>
<li>Assign the most important tasks in your day by starting the line with "1. "</li>
<li>What's on your mind today?</li>
</ol>
<pre>def print_hello(name):
print "Hello, %s" % name</pre>
<hr contenteditable="false">
<p><i>Two enters</i> to create a divider to separate your content.</p>
<hr contenteditable="false">
<p>Let your users express themselves. Take a look at the project on Github <a href="github.com/mduvall/grande.js">here</a>.</p>
</article>
</section>
<br/>
<section>
<h1 class="inline-editor"></h1>
<article class="partial-editor"></article>
</section>
<script type="text/javascript" src="js/grande.js"></script>
<script type="text/javascript">
var mockUpload = function(files, callback) {
var file = files[0],
reader = new FileReader();
reader.onload = (function(f) {
return function(e) {
callback(e.target.result);
};
}(file));
reader.readAsDataURL(file);
};
new Grande(document.querySelectorAll(".rich-editor"), {
placeholder: 'You can also set placeholders.',
imagesFromUrls: true,
allowImages: true,
uploadCallback: mockUpload
});
new Grande(document.querySelectorAll(".inline-editor"), {
placeholder: 'Set content here.',
mode: 'inline'
});
new Grande(document.querySelectorAll(".partial-editor"), {
placeholder: 'Set content here.',
mode: 'partial'
});
</script>
</body>
</html>