-
Notifications
You must be signed in to change notification settings - Fork 0
/
demopurejs.html
82 lines (75 loc) · 1.97 KB
/
demopurejs.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
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Simple Editor - Pure JavaScript Version</title>
<style type='text/css'>
* {
box-sizing: border-box;
}
body {
font-family: Ubuntu, Helvetica, Arial, sans-serif;
font-size: 16px;
color: #888;
width: 800px;
margin: 10px auto 0 auto;
}
form .fields {
margin-bottom: 20px;
position: relative;
}
form .fields label {
position: absolute;
left: 10px;
top: 8px;
}
form [type='submit'] {
font-family: inherit;
font-size: inherit;
text-align: center;
padding: 10px;
cursor: pointer;
color: inherit;
border: 1px solid #d1d1d1;
width: 100px;
background-color: #f1f1f1;
}
form [type='submit']:hover {
background-color: #f9f9f9;
}
</style>
<link rel='stylesheet' type='text/css' href='src/simple-editor.css'>
</head>
<body>
<form type='post' method='post' action='#'>
<div class='fields'>
<label for='type'>Type</label>
<textarea id='type' name='type'></textarea>
</div>
<div class='fields'>
<label for='requisites'>Requisites</label>
<textarea id='requisites' name='requisites'>Type <strong>requisites</strong> here...</textarea>
</div>
<div class='fields'>
<label for='description'>Description</label>
<textarea id='description' name='description'></textarea>
</div>
<div class='fields'>
<label for='notes'>Notes</label>
<textarea id='notes' name='notes'>Any additional notes <i>go here</i>!</textarea>
</div>
<input type='submit' value='Go!'>
</form>
<script type='text/javascript' src='src/simple-editor-purejs.js'></script>
<script type='text/javascript'>
simpleEditor.init({
selector: '.fields textarea',
pastePlain: true
});
document.forms[0].addEventListener('submit', function (evt) {
evt.preventDefault();
save();
});
</script>
</body>
</html>