forked from wangeditor-team/wangEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo-initContent.html
54 lines (49 loc) · 1.6 KB
/
demo-initContent.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>wangEditor demo initContent</title>
<style type="text/css">
pre{
border: 1px solid #ccc;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #f5f5f5;
padding: 10px;
margin: 5px 0px;
line-height: 1.4;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
font-size: 0.8em;
}
</style>
<!--引入wangEditor.css-->
<link rel="stylesheet" type="text/css" href="css/wangEditor-1.3.css">
</head>
<body style='padding: 0px 30px'>
<a href="http://www.wangEditor.com/" target='_blank'>wangEditor官网</a>
<a href='https://github.com/wangfupeng1988/wangEditor' target='_blank'>下载源码</a>
<h3>wangEditor demo</h3>
<textarea id='textarea1' style='height:300px; width:100%;'></textarea>
<!--说明-->
<div style='margin-top:20px; border:1px solid #ccc; padding:0px 10px 15px 10px;'>
<p>在demo-basic.html应用的基础上,可通过传入'$initContent',来配置在初始化时要显示的内容。</p>
<pre>
var $initContent = $('<p>欢迎使用<b>wangEditor</b>富文本编辑器!</p>');
$('#textarea1').wangEditor({
'$initContent': $initContent
});
</pre>
</div>
<script type="text/javascript" src='js/jquery-1.10.2.min.js'></script>
<script type="text/javascript" src='js/wangEditor-1.3.js'></script>
<script type="text/javascript">
$(function(){
var $initContent = $('<p>欢迎使用<b>wangEditor</b>富文本编辑器!</p>');
$('#textarea1').wangEditor({
'$initContent': $initContent
});
});
</script>
</body>
</html>