1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
+ "http://www.w3.org/TR/html4/strict.dtd">
3
+
4
+ < html lang ="en ">
5
+ < head >
6
+ < meta http-equiv ="Content-Type " content ="text/html; charset=utf-8 ">
7
+ < title > Editor</ title >
8
+ < meta name ="author " content ="Fabian Jakobs ">
9
+
10
+ < style type ="text/css " media ="screen ">
11
+
12
+ html {
13
+ height : 100% ;
14
+ overflow : hidden;
15
+ }
16
+
17
+ body {
18
+ overflow : hidden;
19
+ margin : 0 ;
20
+ padding : 0 ;
21
+ height : 100% ;
22
+ width : 100% ;
23
+ font-family : Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;
24
+ font-size : 12px ;
25
+ background : rgb (14 , 98 , 165 );
26
+ color : white;
27
+ }
28
+
29
+ # editor {
30
+ top : 55px ;
31
+ left : 0px ;
32
+ background : white;
33
+ }
34
+
35
+ # controls {
36
+ width : 100% ;
37
+ height : 55px ;
38
+ }
39
+
40
+ # jump {
41
+ position : absolute;
42
+ width : 10px ;
43
+ height : 10px ;
44
+ border : 1px solid red;
45
+ z-index : 10000 ;
46
+ display : none;
47
+ }
48
+
49
+ # cockpitInput {
50
+ position : absolute;
51
+ width : 100% ;
52
+ bottom : 0 ;
53
+
54
+ border : none; outline : none;
55
+ font-family : consolas, courier, monospace;
56
+ font-size : 120% ;
57
+ }
58
+
59
+ # cockpitOutput {
60
+ padding : 10px ;
61
+ margin : 0 15px ;
62
+ border : 1px solid # AAA ;
63
+ -moz-border-radius-topleft : 10px ;
64
+ -moz-border-radius-topright : 10px ;
65
+ border-top-left-radius : 4px ; border-top-right-radius : 4px ;
66
+ background : # DDD ; color : # 000 ;
67
+ }
68
+ </ style >
69
+ </ head >
70
+ < body >
71
+ < div id ="jump "> </ div >
72
+
73
+ < table id ="controls ">
74
+ < tr >
75
+ < td >
76
+ < label for ="doc "> Document:</ label >
77
+ < select id ="doc " size ="1 ">
78
+ < option value ="js "> JS Document</ option >
79
+ < option value ="html "> HTML Document</ option >
80
+ < option value ="css "> CSS Document</ option >
81
+ < option value ="python "> Python Document</ option >
82
+ < option value ="php "> PHP Document</ option >
83
+ </ select >
84
+ </ td >
85
+ < td >
86
+ < label for ="mode "> Mode:</ label >
87
+ < select id ="mode " size ="1 ">
88
+ < option value ="text "> Plain Text</ option >
89
+ < option value ="javascript "> JavaScript</ option >
90
+ < option value ="xml "> XML</ option >
91
+ < option value ="html "> HTML</ option >
92
+ < option value ="css "> CSS</ option >
93
+ < option value ="python "> Python</ option >
94
+ < option value ="php "> PHP</ option >
95
+ </ select >
96
+ </ td >
97
+ < td >
98
+ < label for ="theme "> Theme:</ label >
99
+ < select id ="theme " size ="1 ">
100
+ < option value ="ace/theme/textmate "> TextMate</ option >
101
+ < option value ="ace/theme/eclipse "> Eclipse</ option >
102
+ < option value ="ace/theme/dawn "> Dawn</ option >
103
+ < option value ="ace/theme/idle_fingers "> idleFingers</ option >
104
+ < option value ="ace/theme/pastel_on_dark "> Pastel on dark</ option >
105
+ < option value ="ace/theme/twilight "> Twilight</ option >
106
+ </ select >
107
+ </ td >
108
+ < td >
109
+ < label for ="select_style "> Full line selections</ label >
110
+ < input type ="checkbox " name ="select_style " id ="select_style " checked >
111
+ </ td >
112
+ < td >
113
+ < label for ="highlight_active "> Highlight active line</ label >
114
+ < input type ="checkbox " name ="highlight_active " id ="highlight_active " checked >
115
+ </ td >
116
+ < td >
117
+ < label for ="show_hidden "> Show invisibles</ label >
118
+ < input type ="checkbox " name ="show_hidden " id ="show_hidden ">
119
+ </ td >
120
+ < td align ="right ">
121
+ < img src ="demo/logo.png ">
122
+ </ td >
123
+ </ tr >
124
+ </ table >
125
+
126
+ < div id ="editor ">
127
+ </ div >
128
+
129
+ < script type ="text/editor " id ="jstext "> function foo ( items ) {
130
+ for ( var i = 0 ; i < items . length ; i ++ ) {
131
+ alert ( items [ i ] + "juhu" ) ;
132
+ }
133
+ } </ script >
134
+
135
+ < script type ="text/editor " id ="csstext "> . text - layer {
136
+ font - family : Monaco , "Courier New" , monospace ;
137
+ font - size : 12 px ;
138
+ cursor: text ;
139
+ } </ script >
140
+
141
+ < script type ="text/editor " id ="htmltext "> < html >
142
+ < head >
143
+
144
+ < style type = "text/css" >
145
+ .text-layer {
146
+ font - family : Monaco , "Courier New" , monospace ;
147
+ font - size : 12 px ;
148
+ cursor : text ;
149
+ }
150
+ </ style >
151
+
152
+ </ head >
153
+ < body >
154
+ < h1 style = "color:red" > Juhu Kinners</ h1 >
155
+ </ body >
156
+ </ html > </ script >
157
+
158
+ < script type ="text/editor " id ="pythontext "> #!/usr/local/bin/python
159
+
160
+ import string , sys
161
+
162
+ # If no arguments were given , print a helpful message
163
+ if len ( sys . argv ) == 1 :
164
+ print 'Usage: celsius temp1 temp2 ...'
165
+ sys . exit ( 0 )
166
+
167
+ # Loop over the arguments
168
+ for i in sys . argv [ 1 :] :
169
+ try :
170
+ fahrenheit = float ( string . atoi ( i ) )
171
+ except string . atoi_error :
172
+ print repr ( i ) , "not a numeric value"
173
+ else:
174
+ celsius = ( fahrenheit - 32 ) * 5.0 / 9.0
175
+ print '%i\260F = %i\260C' % ( int ( fahrenheit ) , int ( celsius + .5 ) )
176
+ </ script >
177
+
178
+ < script type ="text/editor " id ="phptext "> < ?php
179
+
180
+ function nfact ( $n ) {
181
+ if ( $n == 0 ) {
182
+ return 1 ;
183
+ }
184
+ else {
185
+ return $n * nfact ( $n - 1 ) ;
186
+ }
187
+ }
188
+
189
+ echo "\n\nPlease enter a whole number ... " ;
190
+ $num = trim ( fgets ( STDIN ) ) ;
191
+
192
+ // ===== PROCESS - Determing the factorial of the input number =====
193
+ $output = "\n\nFactorial " . $num . " = " . nfact($num) . " \n\n";
194
+ echo $output ;
195
+
196
+ ?> </ script >
197
+
198
+ < input id ="cockpitInput " type ="text "/>
199
+
200
+ < script src ="demo/require.js " type ="text/javascript " charset ="utf-8 "> </ script >
201
+ < script src ="build/demo/startup.js " type ="text/javascript " charset ="utf-8 "> </ script >
202
+ < script src ="build/demo/boot.js " type ="text/javascript " charset ="utf-8 "> </ script >
203
+ < script type ="text/javascript ">
204
+ require ( "demo/boot" , function ( ) { } )
205
+ </ script >
206
+
207
+ </ body >
208
+ </ html >
0 commit comments