-
Notifications
You must be signed in to change notification settings - Fork 12
/
demo.html
36 lines (36 loc) · 1.3 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title> Textarea with line numbers </title>
<style type="text/css">
/* none of this truly matters, except maybe the wrapper size */
body{text-align:center}
h1,button{margin:25px;}
label,input{margin:0;vertical-align:middle;}
#wrapper{border:1px solid red;position:relative;
height:500px;width:500px;margin:15px auto}
#wrapper::before {
content:"wrapper";text-transform: uppercase;left:0px;
position:absolute;top:-18px;font-size:16px;color:red; }
</style>
<link rel="stylesheet" type="text/css" href="./tln.min.css"/>
<script type="text/javascript" src="./tln.min.js"></script>
</head>
<body>
<h1> Example </h1>
<button onclick="TLN.append_line_numbers('test')"> NUMBERIFY! </button>
<button onclick="TLN.remove_line_numbers('test')"> UN-NUMBERIFY! </button>
<div id="wrapper">
<textarea id="test" class="banana-cake"></textarea>
</div>
<label>
Width:
<input oninput="wrapper.style.width=this.value+'px';" type="range" value="500" min="100" max="700" />
</label>
<label>
Height:
<input oninput="wrapper.style.height=this.value+'px';" type="range" value="500" min="100" max="700" />
</label>
</body>
</html>