-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (41 loc) · 1.53 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
<!DOCTYPE html>
<html>
<head>
<title></title>
<!--<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>-->
<!--<script src="http://dl.dropboxusercontent.com/u/14243582/jscalc/js/rangy-core.js"></script>-->
<!--<script src="http://dl.dropboxusercontent.com/u/14243582/jscalc/js/rangy-selectionsaverestore.js"></script>-->
<script src="scripts/jquery-1.9.1.min.js"></script>
<script src="scripts/rangy-core.js"></script>
<script src="scripts/rangy-selectionsaverestore.js"></script>
<script src="scripts/script.js"></script>
<link href="styles/styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="pad" contentEditable="true" tabindex="0">input some tag[a] or numbers</div>
<div id="pad2" contentEditable="true" tabindex="0">input some tag[a] or numbers</div>
</body>
</html>
<script>
var h1 = new synt_hl('#pad');
h1.addElem({
re: '(<a>)',
by: "<span class='hlight_red'>$1</span>"
});
var h2 = new synt_hl('#pad2');
h2.addElem({
re: '(<2a>)',
by: "<span class='hlight_red'>$1</span>"
});
//
// var h2 = synt_hl;
// addRegex({
// re: '(<\/a>)',
// by: "<span class='hlight_red'>$1</span>"
// });
//
// addRegex({
// re: '(<a>)',
// by: "<span class='hlight_blue'>$1</span>"
// });
</script>