-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
38 lines (31 loc) · 1.11 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Easy Note</title>
<link rel="stylesheet" href="css/site.css">
<link rel="stylesheet" href="richtext.min.css">
<script src="jquery.min.js"></script>
<script src="jquery.richtext.min.js"></script>
</head>
<body>
<div class="page-wrapper box-content">
<textarea id="hidden-texterea" class="content" name="example"></textarea>
</div>
<script>
$(document).ready(function() {
$('.content').richText();
var content = localStorage.myMarkdownHereEditor;//decodeURIComponent, encodeURIComponent
//console.log(cookie);
if(content) {
$('div.richText-editor').html(decodeURIComponent(content));
}
$('div.richText-editor').keyup(function() {
//console.log(this.innerHTML);
localStorage.myMarkdownHereEditor = encodeURIComponent(this.innerHTML);
//console.log(document.cookie);
})
});
</script>
</body>
</html>