-
Notifications
You must be signed in to change notification settings - Fork 1
/
editor.htm
83 lines (68 loc) · 1.61 KB
/
editor.htm
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width maximum-scale=1 initial-scale=1 user-scalable=no">
<title>Syntax highlighting</title>
<style>
body {
background-color: #ddd;
font-family: 'Helvetica Neue', HelveticaNeue, sans-serif;
text-shadow: white 0px 1px 1px;
}
#expression {
background-color: #fff;
width: 95%;
font-family: monospace;
font-size: 1.3em;
border: 1px solid #bbb;
border-radius: 0.5em;
margin: 0;
text-shadow: none;
padding: 0.2em 0.3em 0.2em 0.4em;
white-space: pre-wrap;
}
span.Number {
color: green;
}
span.Identifier {
color: blue;
}
span.Operator {
color: #333;
}
span.blank {
color: #555;
}
span.cursor {
border-left: 1px solid #333;
position: absolute;
opacity: 1;
}
span.error {
color: red;
}
span.selected {
background-color: Highlight !important;
color: HighlightText !important;
}
.footer {
text-shadow: none;
font-size: 0.8em;
color: #888;
margin-top: 2em;
}
</style>
</head>
<body spellcheck="false">
<p>Syntax highlighted expression editor:</p>
<div id="expression"></div>
<p class="footer">Supported tested browsers: Firefox 4+,
Safari 5+, Chrome 9+, Opera 11+, Konqueror 4.6+.</p>
<script src="TapDigit.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = new TapDigit.Editor(document.getElementById('expression'));
editor.focus();
</script>
</body>
</html>