-
Notifications
You must be signed in to change notification settings - Fork 19
/
demo.html
55 lines (50 loc) · 2.19 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Simditor</title>
<meta name="viewport" content="width=device-width">
<link media="all" rel="stylesheet" type="text/css" href="vendor/bower/fontawesome/css/font-awesome.min.css" />
<link media="all" rel="stylesheet" type="text/css" href="vendor/bower/simditor/styles/simditor.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/simditor-emoji.css" />
<script type="text/javascript" src="vendor/bower/jquery/dist/jquery.min.js"></script>
</head>
<body>
<div class="wrapper">
<section id="page-demo">
<textarea id="txt-content" data-autosave="editor-content" autofocus>
<p>Simditor 是团队协作工具 <a href="http://tower.im">Tower</a> 使用的富文本编辑器。</p>
<p>相比传统的编辑器它的特点是:</p>
<ul>
<li>功能精简,加载快速</li>
<li>输出格式化的标准 HTML</li>
<li>每一个功能都有非常优秀的使用体验</li>
</ul>
</textarea>
</section>
</div>
<script type="text/javascript" src="vendor/bower/simple-module/lib/module.js"></script>
<script type="text/javascript" src="vendor/bower/simple-uploader/lib/uploader.js"></script>
<script type="text/javascript" src="vendor/bower/simple-hotkeys/lib/hotkeys.js"></script>
<script type="text/javascript" src="vendor/bower/simditor/lib/simditor.js"></script>
<script type="text/javascript" src="lib/simditor-emoji.js"></script>
<script type="text/javascript">
$(function() {
var editor = new Simditor({
textarea: $('#txt-content'),
placeholder: '这里输入文字...',
pasteImage: true,
toolbar: ['emoji', 'title', 'bold', 'italic', 'underline', 'strikethrough', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent'],
defaultImage: 'images/image.png',
upload: location.search === '?upload' ? {
url: '/upload'
} : false,
emoji: {
imagePath: 'images/emoji/'
}
});
});
</script>
</body>
</html>