forked from jakiestfu/Behave.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
54 lines (43 loc) · 907 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Behave</title>
<style type='text/css'>
body{
text-align:center;
padding:50px;
}
textarea{
width:400px;
height:300px;
border:1px solid #999;
padding:10px;
font-family: monospace;
font-size:13px;
}
textarea:focus{
border-color:#333;
}
</style>
</head>
<body>
<h1>Example</h1>
<textarea id="demo"></textarea>
<script type='text/javascript' src="behave.js"></script>
<script type="text/javascript">
window.onload = function(){
var editor = new Behave({
textarea: document.getElementById('demo'),
replaceTab: true,
softTabs: true,
softTabSize: 4,
autoOpen: true,
overwrite: true,
autoStrip: true,
autoIndent: true
});
};
</script>
</body>
</html>