-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.html
executable file
·47 lines (47 loc) · 2.7 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
<!doctype html>
<html>
<head>
<title>Editor</title>
<meta charset="utf-8">
<meta name="description" content="A basic medium.com-esque inline HTML editor leveraging contenteditable">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:700' rel='stylesheet'>
<link href='http://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<a href="https://github.com/mjbp/editor"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div id="editor">
<div id="editor-mask">
<div class="editor-buttons">
<button class="icon icon-bold" id="editor-b" data-command="bold"></button>
<button class="icon icon-italic" id="editor-i" data-command="italic"></button>
<button class="icon icon-quote" id="editor-blockquote" data-command="quote"></button>
<button class="heading" id="editor-h1" data-command="h1">h1</button>
<button class="heading" id="editor-h2" data-command="h2">h2</button>
<button class="heading" id="editor-h3" data-command="h3">h3</button>
<button class="heading" id="editor-h4" data-command="h4">h4</button>
<button class="heading" id="editor-h5" data-command="h5">h5</button>
<button class="heading" id="editor-h6" data-command="h6">h6</button>
<button class="icon icon-link" id="editor-a" data-command="a"></button>
</div>
<div id="editor-link-field-holder">
<input type="text" id="editor-link-field" placeholder="Type or paste link">
<button class="icon icon-remove" id="editor-cancel" data-command="cancel"></button>
</div>
</div>
</div>
<section>
<header>
<hgroup>
<h1 class="editable editor-heading" data-placeholder="Type your title"></h1>
<h2 class="editable editor-heading" data-placeholder="Type your subtitle"></h2>
</hgroup>
</header>
<article class="editable" data-placeholder="Type your post"></article>
</section>
<script src="js/editor.js"></script>
<script>
var editor = new Editor('.editable', {buttons:['b', 'i', 'blockquote', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'a', 'cancel']});
</script>
</body>
</html>