forked from kenshin54/popline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
86 lines (82 loc) · 3.94 KB
/
example.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
83
84
85
86
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>popline - An HTML5 Rich-Text-Editor Toolbar</title>
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/toggle-switch.css" />
<!--link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"-->
<link rel="stylesheet" type="text/css" href="themes/default.css" />
<link rel="stylesheet" type="text/css" href="css/page.css" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--[if lt IE 9]>
<script type="text/javascript" src="scripts/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery.popline.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.link.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.blockquote.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.decoration.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.list.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.justify.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.blockformat.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.social.js"></script>
<script type="text/javascript" src="scripts/plugins/jquery.popline.backcolor.js"></script>
<script type="text/javascript">
$(function(){
if ($.popline.utils.browser.ie) {
if ($.popline.utils.browser.ieVersion() < 9) {
$.popline.utils.fixIE8();
}
} else {
document.execCommand('defaultParagraphSeparator', false, 'p');
}
$(".editor").popline({position: "fixed"});
$("input[name='mode']").click(function(){
$(".editor").popline("destroy");
$(".editor").attr("contenteditable", this.id === "edit");
$(".editor").popline({mode: this.id, position: $("input[name='position']:checked").attr("id")});
});
$("input[name='position']").click(function(){
$(".editor").popline("setPosition", this.id);
});
});
</script>
</head>
<body>
<div class="switcher">
<div class="switch-toggle candy blue">
<input id="edit" name="mode" type="radio" checked="">
<label for="edit">Edit</label>
<input id="view" name="mode" type="radio">
<label for="view">View</label>
<a></a>
</div>
<div class="switch-toggle candy blue">
<input id="fixed" name="position" type="radio" checked="">
<label for="fixed">Fixed</label>
<input id="relative" name="position" type="radio">
<label for="relative">Relative</label>
<a></a>
</div>
</div>
<section class="container">
<article class="content">
<div class="editor" contenteditable="true">
<p><a href="https://github.com/kenshin54/popline">Popline</a> is a non-intrusive <font color="#00ae52">WYSIWYG</font> editor.</p>
<p>It shows up only after selecting a piece of text on the page.</p>
<p>Inspired by <a href="http://pilotmoon.com/popclip/" target="_blank">popclip</a>.</p>
<p>It provides commonly used editing features <b>out-of-the-box</b>.</p>
<blockquote>Easy to extend, Easy to customize.</blockquote>
<p>Two modes supported, <i>Edit mode</i> and <i>View mode</i>.</p>
<p>Two popup ways supported, <u>Fixed</u> and <u>Relative</u>.</p>
<p>
The default theme popline used is designed by <a target="_blank" href="https://twitter.com/PepsinY">@Pepsin</a>, Thanks.
</p>
<p style="text-align: right;">happy to use <i class="fa fa-smile-o"></i></p>
<p style="text-align: right;"><a target="_blank" href="https://twitter.com/kenshin54">@kenshin54</a></p>
</div>
</article>
</section>
</body>
</html>