forked from li914/emoji_jQuery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (54 loc) · 1.88 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
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta name="description" content="基于jQuery的表情,QQ表情,贴吧表情,emoji表情">
<meta name="keywords" content="jQuery,表情插件,js表情插件,jQuery插件,jQuery表情插件,js">
<title>基于jQuery的表情插件Emoji</title>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<style type="text/css"> body {
background-color: aquamarine;
}
#test {
width: 360px;
height: 50px;
margin: 0 auto;
}
#div-emoji {
width: 420px;
margin: 0 auto;
padding-top: 120px;
margin-top: 50px;
} </style>
<!--<link href="./dist/main.dev.css?1e18685a24da80faa136" rel="stylesheet">-->
<script type="text/javascript" src="./dist/emoji_jQuery.min.js"></script>
</head>
<body>
<div id="test"></div>
<div id="div-emoji"><p><input id="input" type="text"><input id="btn" type="button" value="emojiBtn"></p></div>
<script> $.Lemoji({
emojiInput: '#input',
emojiBtn: '#btn',
position: 'LEFTBOTTOM',
length: 8,
emojis: {
qq: {path: 'static/images/qq/', code: ':', name: 'QQ表情'},
tieba: {path: 'static/images/tieba', code: ';', name: "贴吧表情"},
emoji: {path: 'static/images/emoji', code: ',', name: 'Emoji表情'}
}
});
$('#btn').click(function () {
var content = $('#input').val();
content = $.emojiParse({
content: content,
emojis: [{type: 'qq', path: 'static/images/qq/', code: ':'}, {
path: 'static/images/tieba/',
code: ';',
type: 'tieba'
}, {path: 'static/images/emoji/', code: ',', type: 'emoji'}]
});
$('#test').html(content);
});</script>
</body>
</html>