-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (42 loc) · 1.33 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>lay xheditor sample</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/xheditor/xheditor-1.2.2.min.js"></script>
<script type="text/javascript" src="js/xheditor/xheditor_lang/zh-cn.js"></script>
<script type="text/javascript" src="js/layer/layer.js"></script>
<script type="text/javascript">
$(function(){
$('#addText').click(function(){
layer.open({
type: 1,
title:"add some text",
area: ['801px', '405px'], //宽高
content: $('#xh'),
end: function(){
$('#content').xheditor(false);
}
});
$('#content').xheditor({tools:'Pastetext,FontSize,FontColor,BackColor,|,Bold,Italic,Align,List,Outdent,Indent,Hr,Table,Source',skin:'nostyle'});
});
$('#btnOk').click(function(){
$('#litext').html($('#content').val());
layer.closeAll();
});
});
</script>
</head>
<body>
<h1>lay xheditor sample</h1>
<a href="#" id="addText">add text</a>
<div id="xh" style="width:100%;display:none;">
<textarea id="content" name="content" style="width:800px;height:300px; display: none;">test</textarea>
<a id="btnOk"> ok </a>
</div>
<hr/>
<span id="litext"></span>
</body>
</html>