AmberRack 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +74 -0
- data/.rvmrc +4 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +62 -0
- data/README.md +17 -0
- data/Rakefile +24 -0
- data/amber-rack.gemspec +33 -0
- data/app/amber_app.rb +35 -0
- data/app/javascripts/Benchfib.deploy.js +159 -0
- data/app/javascripts/Benchfib.js +159 -0
- data/app/javascripts/Canvas.deploy.js +1464 -0
- data/app/javascripts/Canvas.js +1464 -0
- data/app/javascripts/Compiler.deploy.js +1587 -0
- data/app/javascripts/Compiler.js +1587 -0
- data/app/javascripts/Examples.deploy.js +800 -0
- data/app/javascripts/Examples.js +800 -0
- data/app/javascripts/IDE.deploy.js +3457 -0
- data/app/javascripts/IDE.js +3457 -0
- data/app/javascripts/IDE.js.bak +3420 -0
- data/app/javascripts/JQuery.deploy.js +898 -0
- data/app/javascripts/JQuery.js +898 -0
- data/app/javascripts/Kernel.deploy.js +6761 -0
- data/app/javascripts/Kernel.js +6761 -0
- data/app/javascripts/Parser.deploy.js +1655 -0
- data/app/javascripts/Parser.js +1655 -0
- data/app/javascripts/Raphael-Core.js +0 -0
- data/app/javascripts/Raphael-Graph.js +0 -0
- data/app/javascripts/SUnit.deploy.js +1059 -0
- data/app/javascripts/SUnit.js +1059 -0
- data/app/javascripts/application.js +2 -0
- data/app/javascripts/boot.js +466 -0
- data/app/javascripts/init.js +2 -0
- data/app/javascripts/jquery-1.4.4.min.js +167 -0
- data/app/javascripts/jquery-ui-1.8.9.custom.min.js +781 -0
- data/app/javascripts/jquery.textarea.js +267 -0
- data/app/javascripts/jtalk.js +78 -0
- data/app/javascripts/lib/CodeMirror/LICENSE +19 -0
- data/app/javascripts/lib/CodeMirror/README.md +6 -0
- data/app/javascripts/lib/CodeMirror/compress.html +92 -0
- data/app/javascripts/lib/CodeMirror/css/baboon.png +0 -0
- data/app/javascripts/lib/CodeMirror/css/baboon_vector.svg +153 -0
- data/app/javascripts/lib/CodeMirror/css/docs.css +154 -0
- data/app/javascripts/lib/CodeMirror/demo/activeline.html +72 -0
- data/app/javascripts/lib/CodeMirror/demo/changemode.html +51 -0
- data/app/javascripts/lib/CodeMirror/demo/complete.html +79 -0
- data/app/javascripts/lib/CodeMirror/demo/complete.js +151 -0
- data/app/javascripts/lib/CodeMirror/demo/fullscreen.html +158 -0
- data/app/javascripts/lib/CodeMirror/demo/marker.html +53 -0
- data/app/javascripts/lib/CodeMirror/demo/mustache.html +57 -0
- data/app/javascripts/lib/CodeMirror/demo/preview.html +75 -0
- data/app/javascripts/lib/CodeMirror/demo/resize.html +44 -0
- data/app/javascripts/lib/CodeMirror/demo/runmode.html +50 -0
- data/app/javascripts/lib/CodeMirror/demo/search.html +106 -0
- data/app/javascripts/lib/CodeMirror/demo/theme.html +53 -0
- data/app/javascripts/lib/CodeMirror/index.html +239 -0
- data/app/javascripts/lib/CodeMirror/internals.html +389 -0
- data/app/javascripts/lib/CodeMirror/lib/codemirror.css +67 -0
- data/app/javascripts/lib/CodeMirror/lib/codemirror.js +2144 -0
- data/app/javascripts/lib/CodeMirror/lib/overlay.js +51 -0
- data/app/javascripts/lib/CodeMirror/lib/runmode.js +27 -0
- data/app/javascripts/lib/CodeMirror/manual.html +854 -0
- data/app/javascripts/lib/CodeMirror/mode/clike/clike.js +247 -0
- data/app/javascripts/lib/CodeMirror/mode/clike/index.html +102 -0
- data/app/javascripts/lib/CodeMirror/mode/css/css.js +124 -0
- data/app/javascripts/lib/CodeMirror/mode/css/index.html +56 -0
- data/app/javascripts/lib/CodeMirror/mode/diff/diff.css +3 -0
- data/app/javascripts/lib/CodeMirror/mode/diff/diff.js +13 -0
- data/app/javascripts/lib/CodeMirror/mode/diff/index.html +99 -0
- data/app/javascripts/lib/CodeMirror/mode/haskell/haskell.js +242 -0
- data/app/javascripts/lib/CodeMirror/mode/haskell/index.html +60 -0
- data/app/javascripts/lib/CodeMirror/mode/htmlmixed/htmlmixed.js +79 -0
- data/app/javascripts/lib/CodeMirror/mode/htmlmixed/index.html +52 -0
- data/app/javascripts/lib/CodeMirror/mode/javascript/index.html +78 -0
- data/app/javascripts/lib/CodeMirror/mode/javascript/javascript.js +348 -0
- data/app/javascripts/lib/CodeMirror/mode/lua/index.html +72 -0
- data/app/javascripts/lib/CodeMirror/mode/lua/lua.js +138 -0
- data/app/javascripts/lib/CodeMirror/mode/php/index.html +49 -0
- data/app/javascripts/lib/CodeMirror/mode/php/php.js +110 -0
- data/app/javascripts/lib/CodeMirror/mode/plsql/index.html +63 -0
- data/app/javascripts/lib/CodeMirror/mode/plsql/plsql.js +217 -0
- data/app/javascripts/lib/CodeMirror/mode/python/LICENSE.txt +21 -0
- data/app/javascripts/lib/CodeMirror/mode/python/index.html +123 -0
- data/app/javascripts/lib/CodeMirror/mode/python/python.js +321 -0
- data/app/javascripts/lib/CodeMirror/mode/rst/index.html +526 -0
- data/app/javascripts/lib/CodeMirror/mode/rst/rst.css +75 -0
- data/app/javascripts/lib/CodeMirror/mode/rst/rst.js +333 -0
- data/app/javascripts/lib/CodeMirror/mode/scheme/index.html +65 -0
- data/app/javascripts/lib/CodeMirror/mode/scheme/scheme.js +181 -0
- data/app/javascripts/lib/CodeMirror/mode/smalltalk/index.html +56 -0
- data/app/javascripts/lib/CodeMirror/mode/smalltalk/smalltalk.js +134 -0
- data/app/javascripts/lib/CodeMirror/mode/sparql/index.html +41 -0
- data/app/javascripts/lib/CodeMirror/mode/sparql/sparql.js +143 -0
- data/app/javascripts/lib/CodeMirror/mode/stex/index.html +96 -0
- data/app/javascripts/lib/CodeMirror/mode/stex/stex.js +167 -0
- data/app/javascripts/lib/CodeMirror/mode/xml/index.html +42 -0
- data/app/javascripts/lib/CodeMirror/mode/xml/xml.js +231 -0
- data/app/javascripts/lib/CodeMirror/mode/yaml/index.html +68 -0
- data/app/javascripts/lib/CodeMirror/mode/yaml/yaml.js +95 -0
- data/app/javascripts/lib/CodeMirror/oldrelease.html +178 -0
- data/app/javascripts/lib/CodeMirror/test/index.html +29 -0
- data/app/javascripts/lib/CodeMirror/test/test.js +249 -0
- data/app/javascripts/lib/CodeMirror/theme/default.css +18 -0
- data/app/javascripts/lib/CodeMirror/theme/elegant.css +9 -0
- data/app/javascripts/lib/CodeMirror/theme/jtalk.css +21 -0
- data/app/javascripts/lib/CodeMirror/theme/neat.css +8 -0
- data/app/javascripts/lib/CodeMirror/theme/night.css +20 -0
- data/app/javascripts/lib/jQuery/jquery-1.4.4.min.js +167 -0
- data/app/javascripts/lib/jQuery/jquery-ui-1.8.9.custom.min.js +781 -0
- data/app/javascripts/lib/jQuery/jquery.textarea.js +267 -0
- data/app/smalltalk/Canvas.st +481 -0
- data/app/smalltalk/IDE.st +1752 -0
- data/config.ru +2 -0
- data/lib/amber-rack.rb +4 -0
- data/lib/amber-rack/version.rb +3 -0
- data/public/CodeMirror/LICENSE +19 -0
- data/public/CodeMirror/README.md +6 -0
- data/public/CodeMirror/compress.html +92 -0
- data/public/CodeMirror/css/baboon.png +0 -0
- data/public/CodeMirror/css/baboon_vector.svg +153 -0
- data/public/CodeMirror/css/docs.css +154 -0
- data/public/CodeMirror/demo/activeline.html +72 -0
- data/public/CodeMirror/demo/changemode.html +51 -0
- data/public/CodeMirror/demo/complete.html +79 -0
- data/public/CodeMirror/demo/complete.js +151 -0
- data/public/CodeMirror/demo/fullscreen.html +158 -0
- data/public/CodeMirror/demo/marker.html +53 -0
- data/public/CodeMirror/demo/mustache.html +57 -0
- data/public/CodeMirror/demo/preview.html +75 -0
- data/public/CodeMirror/demo/resize.html +44 -0
- data/public/CodeMirror/demo/runmode.html +50 -0
- data/public/CodeMirror/demo/search.html +106 -0
- data/public/CodeMirror/demo/theme.html +53 -0
- data/public/CodeMirror/index.html +239 -0
- data/public/CodeMirror/internals.html +389 -0
- data/public/CodeMirror/lib/codemirror.css +67 -0
- data/public/CodeMirror/lib/codemirror.js +2144 -0
- data/public/CodeMirror/lib/overlay.js +51 -0
- data/public/CodeMirror/lib/runmode.js +27 -0
- data/public/CodeMirror/manual.html +854 -0
- data/public/CodeMirror/mode/clike/clike.js +247 -0
- data/public/CodeMirror/mode/clike/index.html +102 -0
- data/public/CodeMirror/mode/css/css.js +124 -0
- data/public/CodeMirror/mode/css/index.html +56 -0
- data/public/CodeMirror/mode/diff/diff.css +3 -0
- data/public/CodeMirror/mode/diff/diff.js +13 -0
- data/public/CodeMirror/mode/diff/index.html +99 -0
- data/public/CodeMirror/mode/haskell/haskell.js +242 -0
- data/public/CodeMirror/mode/haskell/index.html +60 -0
- data/public/CodeMirror/mode/htmlmixed/htmlmixed.js +79 -0
- data/public/CodeMirror/mode/htmlmixed/index.html +52 -0
- data/public/CodeMirror/mode/javascript/index.html +78 -0
- data/public/CodeMirror/mode/javascript/javascript.js +348 -0
- data/public/CodeMirror/mode/lua/index.html +72 -0
- data/public/CodeMirror/mode/lua/lua.js +138 -0
- data/public/CodeMirror/mode/php/index.html +49 -0
- data/public/CodeMirror/mode/php/php.js +110 -0
- data/public/CodeMirror/mode/plsql/index.html +63 -0
- data/public/CodeMirror/mode/plsql/plsql.js +217 -0
- data/public/CodeMirror/mode/python/LICENSE.txt +21 -0
- data/public/CodeMirror/mode/python/index.html +123 -0
- data/public/CodeMirror/mode/python/python.js +321 -0
- data/public/CodeMirror/mode/rst/index.html +526 -0
- data/public/CodeMirror/mode/rst/rst.css +75 -0
- data/public/CodeMirror/mode/rst/rst.js +333 -0
- data/public/CodeMirror/mode/scheme/index.html +65 -0
- data/public/CodeMirror/mode/scheme/scheme.js +181 -0
- data/public/CodeMirror/mode/smalltalk/index.html +56 -0
- data/public/CodeMirror/mode/smalltalk/smalltalk.js +134 -0
- data/public/CodeMirror/mode/sparql/index.html +41 -0
- data/public/CodeMirror/mode/sparql/sparql.js +143 -0
- data/public/CodeMirror/mode/stex/index.html +96 -0
- data/public/CodeMirror/mode/stex/stex.js +167 -0
- data/public/CodeMirror/mode/xml/index.html +42 -0
- data/public/CodeMirror/mode/xml/xml.js +231 -0
- data/public/CodeMirror/mode/yaml/index.html +68 -0
- data/public/CodeMirror/mode/yaml/yaml.js +95 -0
- data/public/CodeMirror/oldrelease.html +178 -0
- data/public/CodeMirror/test/index.html +29 -0
- data/public/CodeMirror/test/test.js +249 -0
- data/public/CodeMirror/theme/default.css +18 -0
- data/public/CodeMirror/theme/elegant.css +9 -0
- data/public/CodeMirror/theme/jtalk.css +21 -0
- data/public/CodeMirror/theme/neat.css +8 -0
- data/public/CodeMirror/theme/night.css +20 -0
- data/public/css/jtalk.css +362 -0
- data/public/css/style.css +456 -0
- data/public/css/sunit.css +66 -0
- data/public/ide/fork_me.png +0 -0
- data/public/ide/screen2.png +0 -0
- data/public/ide/style.css +456 -0
- data/public/ide/syntax.css +61 -0
- data/public/ide/text_header.png +0 -0
- data/public/ide/title_container1.png +0 -0
- data/public/images/background_box.png +0 -0
- data/public/images/background_header.png +0 -0
- data/public/images/balloon_header.png +0 -0
- data/views/index.haml +66 -0
- metadata +341 -0
Binary file
|
@@ -0,0 +1,153 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
+
|
4
|
+
<svg
|
5
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
7
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
10
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
11
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
12
|
+
id="svg3181"
|
13
|
+
version="1.1"
|
14
|
+
inkscape:version="0.48.0 r9654"
|
15
|
+
width="1750"
|
16
|
+
height="960"
|
17
|
+
xml:space="preserve"
|
18
|
+
sodipodi:docname="baboon_vector.svg"><metadata
|
19
|
+
id="metadata3187"><rdf:RDF><cc:Work
|
20
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
21
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
22
|
+
id="defs3185"><clipPath
|
23
|
+
clipPathUnits="userSpaceOnUse"
|
24
|
+
id="clipPath3195"><path
|
25
|
+
d="M 0,768 1400,768 1400,0 0,0 0,768 z"
|
26
|
+
id="path3197" /></clipPath><clipPath
|
27
|
+
clipPathUnits="userSpaceOnUse"
|
28
|
+
id="clipPath3215"><path
|
29
|
+
d="M 0,768 1400,768 1400,0 0,0 0,768 z"
|
30
|
+
id="path3217" /></clipPath></defs><sodipodi:namedview
|
31
|
+
pagecolor="#ffffff"
|
32
|
+
bordercolor="#666666"
|
33
|
+
borderopacity="1"
|
34
|
+
objecttolerance="10"
|
35
|
+
gridtolerance="10"
|
36
|
+
guidetolerance="10"
|
37
|
+
inkscape:pageopacity="0"
|
38
|
+
inkscape:pageshadow="2"
|
39
|
+
inkscape:window-width="1440"
|
40
|
+
inkscape:window-height="851"
|
41
|
+
id="namedview3183"
|
42
|
+
showgrid="false"
|
43
|
+
inkscape:zoom="0.20550291"
|
44
|
+
inkscape:cx="1534.1667"
|
45
|
+
inkscape:cy="795.78156"
|
46
|
+
inkscape:window-x="0"
|
47
|
+
inkscape:window-y="0"
|
48
|
+
inkscape:window-maximized="1"
|
49
|
+
inkscape:current-layer="g3189" /><g
|
50
|
+
id="g3189"
|
51
|
+
inkscape:groupmode="layer"
|
52
|
+
inkscape:label="baboon_vector"
|
53
|
+
transform="matrix(1.25,0,0,-1.25,0,960)"><g
|
54
|
+
id="g3191"><g
|
55
|
+
id="g3193"
|
56
|
+
clip-path="url(#clipPath3195)"><g
|
57
|
+
id="g3199"
|
58
|
+
transform="translate(458.9561,569.9678)"><path
|
59
|
+
d="m 0,0 59.835,69.355 87.034,26.518 133.949,-7.479 c 0,0 74.116,-32.639 74.795,-34.678 0.68,-2.04 84.314,-59.155 84.314,-59.155 l 12.238,-74.795 5.439,-97.912 -13.598,-25.159 -4.76,-40.797 -18.358,-23.118 24.39,-5.561 0.501,-5.192 -14.012,-60.641 16.477,-93.368 7.223,-49.972 -208.295,-51.754 -18.552,4.005 -37.468,8.325 -10.036,4.036 -66.885,10.101 c 0,0 -14.959,74.793 -16.999,73.433 -2.039,-1.359 -42.836,56.437 -42.836,56.437 l -19.719,65.274 12.48,74.571 -7.961,9.643 -26.479,16.187 -12.716,38.309 4.08,48.277 8.769,38.985 L 6.608,-74.308 0,0 z"
|
60
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
61
|
+
id="path3201" /></g><g
|
62
|
+
id="g3203"
|
63
|
+
transform="translate(78.8657,682.1582)"><path
|
64
|
+
d="M 0,0 142.789,40.797 259.74,52.355 313.457,-232.543 204.665,-291.698 78.194,-293.738 0,0 z"
|
65
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
66
|
+
id="path3205" /></g><g
|
67
|
+
id="g3207"
|
68
|
+
transform="translate(269.5122,345.2344)"><path
|
69
|
+
d="M 0,0 18.801,-74.425 40.728,-85.408 59.539,-59.541 40.259,13.503 36.821,15.669 0,0 z"
|
70
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
71
|
+
id="path3209" /></g></g></g><g
|
72
|
+
id="g3223"
|
73
|
+
transform="translate(741.918,109.0332)"><path
|
74
|
+
d="m 0,0 -17.236,-9.401 -16.452,-22.721 -0.783,12.537 6.268,17.234 13.317,6.268 L 0,7.833 14.884,3.917 0,0 z m 172.622,-21.824 c -0.031,0.271 -0.081,0.535 -0.117,0.804 -20.85,7.653 -49.59,7.327 -66.874,10.927 -13.849,2.886 -23.047,9.119 -27.032,12.298 -9.863,-8.494 -12.025,-14.377 -12.025,-14.377 0,0 -9.816,15.309 -30.17,25.76 -7.05,3.621 -17.767,5.691 -29.341,5.691 -24.297,0 -52.384,-9.155 -58.339,-32.223 -10.458,-40.511 9.697,-76.594 49.814,-77.623 1.325,-0.034 2.623,-0.12 3.894,-0.12 36.131,0 48.855,8.572 58.323,15.478 0.027,0.021 0.104,0 0.104,0 0,0 25.126,-11.506 53.529,-11.506 4.419,0 9.156,0.415 14.249,1.063 31.641,4.018 47.989,28.124 43.985,63.828"
|
75
|
+
style="fill:#df0019;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
76
|
+
id="path3225"
|
77
|
+
inkscape:connector-curvature="0" /></g><g
|
78
|
+
id="g3227"
|
79
|
+
transform="translate(300.8481,270.0254)"><path
|
80
|
+
d="m 0,0 c -3.063,-0.691 -12.535,0.784 -12.535,0.784 l 6.267,-25.853 43.481,13.319 -9.01,27.418 C 28.203,15.668 7.867,1.777 0,0"
|
81
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
82
|
+
id="path3229"
|
83
|
+
inkscape:connector-curvature="0" /></g><g
|
84
|
+
id="g3231"
|
85
|
+
transform="translate(211.66052,615.85984)"><path
|
86
|
+
d="m 0,0 -16.243,-2.871 -15.462,-9.4 4.323,-10.938 14.568,9.89 L 2.75,-8.771 0,0 z"
|
87
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
88
|
+
id="path3233"
|
89
|
+
inkscape:connector-curvature="0" /></g><g
|
90
|
+
id="g3235"
|
91
|
+
transform="translate(274.15732,626.4084)"><path
|
92
|
+
d="m 0,0 -15.64,0.407 -14.279,-3.608 2.008,-9.747 14.756,4.208 L 1.111,-8.215 0,0 z"
|
93
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
94
|
+
id="path3237"
|
95
|
+
inkscape:connector-curvature="0" /></g><path
|
96
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
97
|
+
d="M 436.65625 22.28125 C 436.65625 22.28125 338.18375 25.385 251 42.8125 C 163.24875 60.35375 70.40625 99.65625 70.40625 99.65625 L 175.1875 495.28125 L 327.96875 492.34375 L 337.75 527.59375 C 337.75 527.59375 365.095 523.25875 373 518.78125 C 376.31375 516.90375 383.78125 508 383.78125 508 L 377.75 484.65625 L 504.21875 407.15625 L 436.65625 22.28125 z M 410.53125 55.1875 L 465.6875 393.3125 L 346.59375 456.625 L 202.75 466.46875 L 112 114.40625 L 263 79.1875 L 410.53125 55.1875 z "
|
98
|
+
transform="matrix(0.8,0,0,-0.8,0,768)"
|
99
|
+
id="path3253" /><g
|
100
|
+
id="g3247"
|
101
|
+
transform="matrix(1.199238,-0.02879331,0.02673084,1.0520756,172.41935,498.37339)"><path
|
102
|
+
d="m 0,0 c 0,0 -1.861,1.481 -9.143,-1.457 9.712,18.867 9.439,39.989 9.439,39.989 0,0 -3.106,-2.465 -11.311,-8.47 9.241,23.044 5.338,72.525 5.338,72.525 0,0 -17.493,40.746 -13.657,45.799 8.841,11.65 23.834,23.968 44.295,25.594 17.935,1.424 44.606,-4.953 55.865,-15.284 4.536,-4.161 23.367,-47.493 23.367,-47.493 0,0 6.104,-35.271 11.619,-54.108 5.513,-18.839 11.054,-26.674 21.284,-34.825 17.831,-14.207 27.076,-29.938 27.076,-29.938 L 143.399,3.945 c 3.655,-17.356 14.875,-34.28 27.39,-47.672 -12.863,1.507 -19.61,8.783 -19.61,8.783 0,0 2.151,-12.664 9.109,-26.554 l 28.712,15.264 -1.762,10.805 c -5.128,9.304 -9.336,15.534 -9.336,15.534 0,0 2.089,0.956 7.385,-3.572 l -2.005,12.296 c -4.814,9.391 -11.773,16.752 -25.115,31.113 5.944,-6.087 15.438,-5.379 20.751,-4.356 l -0.572,3.512 c -2.231,1.278 -5.494,3.171 -10.241,5.957 -12.43,7.299 -22.326,21.049 -22.326,21.049 0,0 12.85,1.815 20.513,11.022 -7.316,-2.641 -18.585,0.799 -18.585,0.799 -17.086,6.772 -15.022,30.217 -17.687,50.587 -2.667,20.37 -9.299,34.125 -9.299,34.125 0,0 -0.243,2.149 11.91,-5.906 -7.744,33.215 -35.545,44.94 -35.545,44.94 0,0 2.223,2.79 22.843,0.044 -16.469,15.817 -32.303,16.896 -32.303,16.896 0,0 10.077,2.25 23.611,0.24 0,0 -3.327,3.508 -7.549,6.453 L 35.985,194.291 -77.543,167.815 -8.211,-101.17 17.481,-99.413 C 8.602,-85.114 -0.371,-63.837 -2.15,-40.857 -4.911,-5.208 0,0 0,0"
|
103
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
104
|
+
id="path3249"
|
105
|
+
inkscape:connector-curvature="0" /></g><g
|
106
|
+
id="g3255"
|
107
|
+
transform="translate(204.22134,580.88353)"><path
|
108
|
+
d="m 0,0 c 0,-1.418 0.43,-2.736 1.168,-3.83 1.523,0.677 3.551,1.094 5.786,1.094 2.164,0 4.133,-0.39 5.639,-1.029 0.711,1.081 1.129,2.374 1.129,3.765 0,3.79 -3.072,6.861 -6.861,6.861 C 3.071,6.861 0,3.79 0,0"
|
109
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
110
|
+
id="path3257"
|
111
|
+
inkscape:connector-curvature="0" /></g><g
|
112
|
+
id="g3259"
|
113
|
+
transform="translate(256.3311,595.31646)"><path
|
114
|
+
d="m 0,0 c 0,-1.418 0.43,-2.736 1.168,-3.83 1.524,0.677 3.552,1.094 5.787,1.094 2.163,0 4.132,-0.39 5.638,-1.029 0.712,1.081 1.129,2.373 1.129,3.765 0,3.79 -3.072,6.861 -6.861,6.861 C 3.071,6.861 0,3.79 0,0"
|
115
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
116
|
+
id="path3261"
|
117
|
+
inkscape:connector-curvature="0" /></g><g
|
118
|
+
id="g4174"
|
119
|
+
transform="matrix(0.99694509,0.07810563,-0.07810563,0.99694509,47.348748,-15.348299)"><g
|
120
|
+
transform="translate(222.5098,610.1558)"
|
121
|
+
id="g3219"><path
|
122
|
+
inkscape:connector-curvature="0"
|
123
|
+
id="path3221"
|
124
|
+
style="fill:#df0019;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
125
|
+
d="m 0,0 4.45,2.752 5.34,3.785 7.05,-8.226 7.093,-33.359 17.801,-51.259 13.86,-30.215 26.261,-1.55 -6.685,-35.653 c 0,0 -49.98,-21.871 -49.545,-21.911 -42.657,4.001 -12.553,43.066 -8.631,47.301 L 3.666,-47.869 0,0 z" /></g><g
|
126
|
+
transform="translate(247.626,467.3545)"
|
127
|
+
id="g3239"><path
|
128
|
+
inkscape:connector-curvature="0"
|
129
|
+
id="path3241"
|
130
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
131
|
+
d="M 0,0 C -3.044,-0.345 -5.232,-3.092 -4.888,-6.136 -4.543,-9.18 1.576,-2.254 13.308,-4.961 13.971,-1.97 3.044,0.344 0,0" /></g><g
|
132
|
+
transform="translate(279.4419,476.5762)"
|
133
|
+
id="g3243"><path
|
134
|
+
inkscape:connector-curvature="0"
|
135
|
+
id="path3245"
|
136
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
137
|
+
d="M 0,0 C 3.271,1.08 6.798,-0.697 7.88,-3.969 8.96,-7.24 -0.55,-3.044 -11.258,-11.329 -13.345,-8.586 -3.272,-1.081 0,0" /></g><g
|
138
|
+
transform="translate(284.1929,525.9082)"
|
139
|
+
id="g3263"><path
|
140
|
+
inkscape:connector-curvature="0"
|
141
|
+
id="path3265"
|
142
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
143
|
+
d="M 0,0 C 0,0 -6.972,28.671 -6.972,29.355 L 1.585,2.864 9.999,-10.564 13.634,-32.697 7.922,-11.098 0,0 z M -0.633,-15.036 -9.19,-4.86 -16.478,25.776 c -0.202,0.684 9.106,-28.811 9.106,-28.811 l 8.64,-11.642 2.469,-17.336 -4.37,16.977 z m -6.339,-6.085 -10.457,16.826 -5.444,28.646 6.614,-27.842 11.311,-18.026 1.413,-9.583 -3.437,9.979 z m -53.462,-13.246 -1.437,24.944 -2.682,28.754 5.106,-29.895 1.212,-21.677 4.139,-18.236 -6.338,16.11 z m -4.265,-19.55 -6.665,15.516 0.404,29.205 -0.882,28.169 3.104,-28.396 0.808,-26.697 4.242,-15.972 2.423,-6.617 -3.434,4.792 z m -9.695,-2.967 -7.117,16.885 1.318,32.01 0,25.223 2.115,-25.061 -0.581,-31.259 5.869,-16.429 5.056,-8.671 -6.66,7.302 z m 103.144,-7.97 -6.676,20.38 2.141,11.54 L 16.499,-9.376 4.557,13.104 -5.879,53.97 c 0,0 -8.325,-7.41 -16.781,-8.08 -8.455,-0.671 -15.09,4.018 -15.09,4.018 0,0 3.592,-17.761 8.659,-37.597 5.069,-19.836 17.528,-44.866 17.528,-44.866 0,0 21.578,-8.197 24.302,-16.587 2.724,-8.391 -3.508,-22.911 -14.102,-26.551 -10.593,-3.64 -32.284,-8.262 -32.284,-8.262 0,0 -19,1.512 -20.438,14.26 0,0 4.131,16.406 10.418,19.225 6.285,2.819 21.362,11.174 21.362,11.174 l -8.254,1.332 -7.664,-1.332 c 0,0 -4.784,11.295 -10.973,35.086 -6.19,23.79 -8.967,42.485 -8.967,42.485 0,0 -3.912,-4.391 -14.199,-4.885 -10.286,-0.494 -16.031,7.988 -16.031,7.988 l 1.027,-30.185 -1.049,-25.83 -0.15,-29.22 5.102,-15.99 19.818,-30.448 c 0,0 14.102,-9.293 31.728,-9.293 16.453,1.328 51.131,18.047 51.131,18.047 l 9.536,16.687 z" /></g></g><g
|
144
|
+
id="g3267"
|
145
|
+
transform="translate(847.2637,321.5059)"><path
|
146
|
+
d="m 0,0 c 2.252,3.516 6.693,15.3 6.693,15.3 0,0 3.778,-13.306 1.912,-17.213 -3.056,-6.404 -23.905,-15.3 -23.905,-15.3 0,0 12.196,12.364 15.3,17.213 m -33.514,23.16 -0.757,56.352 c 0,0 11.136,-14.028 11.843,-19.739 1.176,-9.491 -11.086,-36.613 -11.086,-36.613 m -17.575,236.921 c 0,0 12.453,-15.338 14.854,-21.39 1.424,-3.591 2.286,-15.287 2.286,-15.287 l -17.14,36.677 z M -98.574,-86.136 c -9.757,-0.906 -29.836,1.016 -38.912,4.708 -7.499,3.05 -25.734,19.656 -25.734,19.656 l 24.187,-10.86 -4.701,17.627 15.272,-22.009 41.813,-5.356 c 0,0 -8.812,-3.477 -11.925,-3.766 m -74.428,157.941 c -4.518,10.057 -1.763,44.065 -1.763,44.065 0,0 7.544,-31.093 12.338,-40.541 6.978,-13.754 37.015,-49.352 37.015,-49.352 0,0 -40.824,30.759 -47.59,45.828 m -17.833,-149.47 -40.407,24.724 1.636,-17.575 0.026,-0.035 -5.178,-29.811 -2.056,-10.701 0.383,-33.34 -4.982,36.406 6.41,41.45 -11.063,8.338 -17.532,43.159 23.502,-38.779 2.351,14.101 40.634,-25.695 11.924,-5.651 13.809,-28.871 -19.457,22.28 z m -85.522,138.863 17.212,-34.424 c 0,0 -12.972,11.185 -15.299,16.257 -1.905,4.152 -1.913,18.167 -1.913,18.167 m -2.367,66.042 c 0,0 -6.206,15.581 -6.323,21.082 -0.168,7.817 4.568,23.148 7.695,30.315 0.755,1.73 4.103,6.341 4.103,6.341 0,0 -4.654,-24.542 -5.347,-32.829 -0.518,-6.205 -0.128,-24.909 -0.128,-24.909 m -7.195,-114.809 c -0.334,3.363 1.912,13.387 1.912,13.387 l 3.825,-29.643 c 0,0 -5.313,11.967 -5.737,16.256 m -20.082,53.549 c -1.394,3.571 -0.956,15.301 -0.956,15.301 l 13.388,-30.6 c 0,0 -10.639,10.71 -12.432,15.299 m -6.03,106.795 c 0,0 -0.315,35.831 4.637,46.379 4.531,9.647 29.936,30.356 29.936,30.356 0,0 -17.824,-22.47 -21.503,-31.2 -5.089,-12.077 -10.119,-51.437 -10.119,-51.437 l -2.951,5.902 z M 50.121,205.01 c 3.335,-9.155 1.168,-38.956 1.168,-38.956 0,0 -5.451,29.987 -9.221,39.366 -4.214,10.487 -23.014,38.907 -23.014,38.907 0,0 26.78,-27.546 31.067,-39.317 M 54.506,95.624 c 0,0 6.884,-18.586 5.738,-24.861 -0.773,-4.241 -9.562,-14.345 -9.562,-14.345 0,0 2.414,12.874 2.868,17.212 0.573,5.474 0.956,21.994 0.956,21.994 M 19.125,-13.389 c 0,0 9.656,22.183 11.062,30.068 1.235,6.941 0,28.203 0,28.203 0,0 8.477,-22.819 7.106,-30.538 C 35.845,6.183 19.125,-13.389 19.125,-13.389 m 441.487,-40.965 c -3.249,8.935 -6.587,17.23 -10.01,24.928 l -1.862,28.873 -8.857,-4.876 -25.862,49.457 -4.828,-10.34 c -32.69,31.48 -70.457,34.284 -111.982,31.646 -65.568,-4.163 -91.587,-41.63 -79.098,-57.241 12.49,-15.613 18.733,-5.205 40.589,5.203 21.858,10.407 74.937,26.017 110.323,-2.082 35.386,-28.1 86.383,-109.281 50.997,-169.646 -35.386,-60.365 -105.626,-105.385 -182.135,-88.465 -86.422,19.112 -126.078,60.082 -177.675,74.811 -8.311,1.334 -18.347,2.789 -24.791,3.191 -12.671,0.792 -21.6,14.727 -21.6,14.727 l 17.181,-9.327 25.763,-2.36 c 2.331,14 9.395,49.054 9.395,49.054 l -8.688,87.29 -18.668,-27.06 -7.246,10.184 -21.349,-22.915 -15.473,-1.959 14.67,6.596 21.38,29.409 6.7,-13.754 19.485,24.691 0.004,-0.011 16.47,9.525 -3.123,68.69 10.407,-10.407 -4.163,40.59 22.173,71.502 -34.662,91.899 16.652,-4.162 -19.773,35.386 -40.591,38.509 9.368,17.693 -93.671,9.368 -20.229,-7.165 -18.437,38.292 13.22,8.813 -69.039,14.69 2.938,19.095 -80.791,-23.303 -26.147,-19.191 -116.339,0 8.814,-10.188 -42.501,-40.641 -8.911,-78.491 7.344,-1.494 8.814,-45.548 23.502,-24.978 19.096,45.533 -14.689,-4.409 41.13,48.474 30.848,26.44 -14.69,-1.469 19.096,16.158 105.763,2.938 72.917,15.799 -41.623,-14.742 -30.181,-7.285 -104.079,-1.043 1.04,-11.449 -64.526,-61.403 14.571,2.081 -27.844,-63.28 c -15.017,-13.719 -28.06,-55.016 -36.687,-75.145 -9.367,-21.856 -20.816,-39.55 -20.816,-39.55 0,0 -30.182,-6.244 -61.405,-18.734 -31.224,-12.489 -43.713,4.163 -43.713,4.163 l -3.122,-8.326 c 0,0 -18.28,-9.057 -39.303,-11.825 -16.43,-2.162 -9.967,-20.946 -9.613,-26.684 0.405,-6.57 4.294,-19.774 8.325,-24.978 3.227,-4.165 12.525,-10.425 17.694,-11.448 12.039,-2.385 28.101,5.204 45.794,17.693 74.936,-6.245 103.241,-10.321 126.974,8.326 14.572,11.448 29.142,22.897 41.631,40.59 l -15.611,42.671 -8.327,-14.569 -5.807,44.931 1.841,17.863 5.547,-51.234 7.789,9.257 35.387,-70.772 11.448,4.164 c 0,0 13.515,-18.583 23.057,-32.881 l -26.02,25.006 -10.224,-5.964 -11.076,22.152 c 0,0 -13.383,-2.353 -24.727,-18.027 -15.862,-21.915 -23.503,-24.678 -17.627,-78.735 5.876,-54.055 16.452,-54.055 64.632,-121.039 11.752,-16.452 14.601,-18.465 14.601,-18.465 l -51.03,-27.365 -22.327,-5.876 -21.384,-11.28 c 0,0 4.744,-8.174 7.495,-9.369 4.739,-2.062 20.613,1.56 20.613,1.56 0,0 15.603,-6.763 36.756,-6.763 21.152,0 32.903,8.225 47.005,8.225 14.101,0 38.78,-8.225 57.582,-5.876 18.802,2.351 22.328,12.927 22.328,12.927 l -51.706,54.057 -4.675,47.096 -56.605,75.769 -3.038,9.437 65.791,-82.24 5.107,-46.75 55.161,-61.405 37.468,-8.325 c 0,0 -0.257,1.226 -0.625,3.114 -6.146,15.664 -6.986,34.894 -1.999,54.214 6.975,27.012 38.85,36.596 64.029,36.596 12.506,0 24.179,-2.312 32.025,-6.341 12.912,-6.63 21.851,-15.076 27.029,-20.917 3.673,4.516 7.133,7.194 11.833,11.11 0,0 12.143,-11.751 45.047,-14.101 27.14,-1.939 45.048,-8.226 70.901,-19.585 53.676,-23.584 102.5,-61.785 207.618,-45.132 105.119,16.651 206.073,113.444 164.442,227.929"
|
147
|
+
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
148
|
+
id="path3269"
|
149
|
+
inkscape:connector-curvature="0" /></g><path
|
150
|
+
inkscape:connector-curvature="0"
|
151
|
+
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
152
|
+
d="m 329.26398,723.3082 -118.025,-19.2 -120.800003,-28.175 72.600003,-281.65 115.075,7.875 95.275,50.65 -44.125,270.5 z m -6.55,-10.575 40.675,-252.4 -87.85,-47.275 -106.125,-7.325 -66.95,262.8 111.4,26.275 108.85,17.925 z"
|
153
|
+
id="path3253-3" /></g></svg>
|
@@ -0,0 +1,154 @@
|
|
1
|
+
body {
|
2
|
+
font-family: Droid Sans, Arial, sans-serif;
|
3
|
+
line-height: 1.5;
|
4
|
+
max-width: 64.3em;
|
5
|
+
margin: 3em auto;
|
6
|
+
padding: 0 1em;
|
7
|
+
}
|
8
|
+
|
9
|
+
h1 {
|
10
|
+
letter-spacing: -3px;
|
11
|
+
font-size: 3.23em;
|
12
|
+
font-weight: bold;
|
13
|
+
margin: 0;
|
14
|
+
}
|
15
|
+
|
16
|
+
h2 {
|
17
|
+
font-size: 1.23em;
|
18
|
+
font-weight: bold;
|
19
|
+
margin: .5em 0;
|
20
|
+
letter-spacing: -1px;
|
21
|
+
}
|
22
|
+
|
23
|
+
h3 {
|
24
|
+
font-size: 1em;
|
25
|
+
font-weight: bold;
|
26
|
+
margin: .4em 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
pre {
|
30
|
+
background-color: #eee;
|
31
|
+
-moz-border-radius: 6px;
|
32
|
+
-webkit-border-radius: 6px;
|
33
|
+
border-radius: 6px;
|
34
|
+
padding: 1em;
|
35
|
+
}
|
36
|
+
|
37
|
+
pre.code {
|
38
|
+
margin: 0 1em;
|
39
|
+
}
|
40
|
+
|
41
|
+
.grey {
|
42
|
+
font-size: 2.2em;
|
43
|
+
padding: .5em 1em;
|
44
|
+
line-height: 1.2em;
|
45
|
+
margin-top: .5em;
|
46
|
+
position: relative;
|
47
|
+
}
|
48
|
+
|
49
|
+
img.logo {
|
50
|
+
position: absolute;
|
51
|
+
right: -25px;
|
52
|
+
bottom: 4px;
|
53
|
+
}
|
54
|
+
|
55
|
+
a:link, a:visited, .quasilink {
|
56
|
+
color: #df0019;
|
57
|
+
cursor: pointer;
|
58
|
+
text-decoration: none;
|
59
|
+
}
|
60
|
+
|
61
|
+
a:hover, .quasilink:hover {
|
62
|
+
color: #800004;
|
63
|
+
}
|
64
|
+
|
65
|
+
h1 a:link, h1 a:visited, h1 a:hover {
|
66
|
+
color: black;
|
67
|
+
}
|
68
|
+
|
69
|
+
ul {
|
70
|
+
margin: 0;
|
71
|
+
padding-left: 1.2em;
|
72
|
+
}
|
73
|
+
|
74
|
+
a.download {
|
75
|
+
color: white;
|
76
|
+
background-color: #df0019;
|
77
|
+
width: 100%;
|
78
|
+
display: block;
|
79
|
+
text-align: center;
|
80
|
+
font-size: 1.23em;
|
81
|
+
font-weight: bold;
|
82
|
+
text-decoration: none;
|
83
|
+
-moz-border-radius: 6px;
|
84
|
+
-webkit-border-radius: 6px;
|
85
|
+
border-radius: 6px;
|
86
|
+
padding: .5em 0;
|
87
|
+
margin-bottom: 1em;
|
88
|
+
}
|
89
|
+
|
90
|
+
a.download:hover {
|
91
|
+
background-color: #bb0010;
|
92
|
+
}
|
93
|
+
|
94
|
+
.rel {
|
95
|
+
margin-bottom: 0;
|
96
|
+
}
|
97
|
+
|
98
|
+
.rel-note {
|
99
|
+
color: #777;
|
100
|
+
font-size: .9em;
|
101
|
+
margin-top: .1em;
|
102
|
+
}
|
103
|
+
|
104
|
+
.logo-braces {
|
105
|
+
color: #df0019;
|
106
|
+
position: relative;
|
107
|
+
top: -4px;
|
108
|
+
}
|
109
|
+
|
110
|
+
.blk {
|
111
|
+
float: left;
|
112
|
+
}
|
113
|
+
|
114
|
+
.left {
|
115
|
+
width: 37em;
|
116
|
+
padding-right: 6.53em;
|
117
|
+
padding-bottom: 1em;
|
118
|
+
}
|
119
|
+
|
120
|
+
.left1 {
|
121
|
+
width: 15.24em;
|
122
|
+
padding-right: 6.45em;
|
123
|
+
}
|
124
|
+
|
125
|
+
.left2 {
|
126
|
+
width: 15.24em;
|
127
|
+
}
|
128
|
+
|
129
|
+
.right {
|
130
|
+
width: 20.68em;
|
131
|
+
}
|
132
|
+
|
133
|
+
.leftbig {
|
134
|
+
width: 42.44em;
|
135
|
+
padding-right: 6.53em;
|
136
|
+
}
|
137
|
+
|
138
|
+
.rightsmall {
|
139
|
+
width: 15.24em;
|
140
|
+
}
|
141
|
+
|
142
|
+
.clear:after {
|
143
|
+
visibility: hidden;
|
144
|
+
display: block;
|
145
|
+
font-size: 0;
|
146
|
+
content: " ";
|
147
|
+
clear: both;
|
148
|
+
height: 0;
|
149
|
+
}
|
150
|
+
.clear { display: inline-block; }
|
151
|
+
/* start commented backslash hack \*/
|
152
|
+
* html .clear { height: 1%; }
|
153
|
+
.clear { display: block; }
|
154
|
+
/* close commented backslash hack */
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>CodeMirror 2: Active Line Demo</title>
|
5
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
6
|
+
<script src="../lib/codemirror.js"></script>
|
7
|
+
<link rel="stylesheet" href="../theme/default.css">
|
8
|
+
<script src="../mode/xml/xml.js"></script>
|
9
|
+
<link rel="stylesheet" href="../css/docs.css">
|
10
|
+
|
11
|
+
<style type="text/css">
|
12
|
+
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
13
|
+
.activeline {background: #f0fcff !important;}
|
14
|
+
</style>
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
<h1>CodeMirror 2: Active Line Demo</h1>
|
18
|
+
|
19
|
+
<form><textarea id="code" name="code">
|
20
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
21
|
+
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
|
22
|
+
xmlns:georss="http://www.georss.org/georss"
|
23
|
+
xmlns:twitter="http://api.twitter.com">
|
24
|
+
<channel>
|
25
|
+
<title>Twitter / codemirror</title>
|
26
|
+
<link>http://twitter.com/codemirror</link>
|
27
|
+
<atom:link type="application/rss+xml"
|
28
|
+
href="http://twitter.com/statuses/user_timeline/242283288.rss" rel="self"/>
|
29
|
+
<description>Twitter updates from CodeMirror / codemirror.</description>
|
30
|
+
<language>en-us</language>
|
31
|
+
<ttl>40</ttl>
|
32
|
+
<item>
|
33
|
+
<title>codemirror: http://cloud-ide.com — they're springing up like mushrooms. This one
|
34
|
+
uses CodeMirror as its editor.</title>
|
35
|
+
<description>codemirror: http://cloud-ide.com — they're springing up like mushrooms. This
|
36
|
+
one uses CodeMirror as its editor.</description>
|
37
|
+
<pubDate>Thu, 17 Mar 2011 23:34:47 +0000</pubDate>
|
38
|
+
<guid>http://twitter.com/codemirror/statuses/48527733722058752</guid>
|
39
|
+
<link>http://twitter.com/codemirror/statuses/48527733722058752</link>
|
40
|
+
<twitter:source>web</twitter:source>
|
41
|
+
<twitter:place/>
|
42
|
+
</item>
|
43
|
+
<item>
|
44
|
+
<title>codemirror: Posted a description of the CodeMirror 2 internals at
|
45
|
+
http://codemirror.net/2/internals.html</title>
|
46
|
+
<description>codemirror: Posted a description of the CodeMirror 2 internals at
|
47
|
+
http://codemirror.net/2/internals.html</description>
|
48
|
+
<pubDate>Wed, 02 Mar 2011 12:15:09 +0000</pubDate>
|
49
|
+
<guid>http://twitter.com/codemirror/statuses/42920879788789760</guid>
|
50
|
+
<link>http://twitter.com/codemirror/statuses/42920879788789760</link>
|
51
|
+
<twitter:source>web</twitter:source>
|
52
|
+
<twitter:place/>
|
53
|
+
</item>
|
54
|
+
</channel>
|
55
|
+
</rss></textarea></form>
|
56
|
+
|
57
|
+
<script>
|
58
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
59
|
+
mode: "application/xml",
|
60
|
+
lineNumbers: true,
|
61
|
+
onCursorActivity: function() {
|
62
|
+
editor.setLineClass(hlLine, null);
|
63
|
+
hlLine = editor.setLineClass(editor.getCursor().line, "activeline");
|
64
|
+
}
|
65
|
+
});
|
66
|
+
var hlLine = editor.setLineClass(0, "activeline");
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<p>Styling the current cursor line.</p>
|
70
|
+
|
71
|
+
</body>
|
72
|
+
</html>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>CodeMirror 2: Mode-Changing Demo</title>
|
5
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
6
|
+
<script src="../lib/codemirror.js"></script>
|
7
|
+
<link rel="stylesheet" href="../theme/default.css">
|
8
|
+
<script src="../mode/javascript/javascript.js"></script>
|
9
|
+
<script src="../mode/scheme/scheme.js"></script>
|
10
|
+
<link rel="stylesheet" href="../css/docs.css">
|
11
|
+
|
12
|
+
<style type="text/css">
|
13
|
+
.CodeMirror {border: 1px solid black;}
|
14
|
+
</style>
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
<h1>CodeMirror 2: Mode-Changing demo</h1>
|
18
|
+
|
19
|
+
<form><textarea id="code" name="code">
|
20
|
+
;; If there is Scheme code in here, the editor will be in Scheme mode.
|
21
|
+
;; If you put in JS instead, it'll switch to JS mode.
|
22
|
+
|
23
|
+
(define (double x)
|
24
|
+
(* x x))
|
25
|
+
</textarea></form>
|
26
|
+
|
27
|
+
<p>On changes to the content of the above editor, a (crude) script
|
28
|
+
tries to auto-detect the language used, and switches the editor to
|
29
|
+
either JavaScript or Scheme mode based on that.</p>
|
30
|
+
|
31
|
+
<script>
|
32
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
33
|
+
mode: "scheme",
|
34
|
+
lineNumbers: true,
|
35
|
+
matchBrackets: true,
|
36
|
+
tabMode: "indent",
|
37
|
+
onChange: function() {
|
38
|
+
clearTimeout(pending);
|
39
|
+
setTimeout(update, 400);
|
40
|
+
}
|
41
|
+
});
|
42
|
+
var pending;
|
43
|
+
function looksLikeScheme(code) {
|
44
|
+
return !/^\s*\(\s*function\b/.test(code) && /^\s*[;\(]/.test(code);
|
45
|
+
}
|
46
|
+
function update() {
|
47
|
+
editor.setOption("mode", looksLikeScheme(editor.getValue()) ? "scheme" : "javascript");
|
48
|
+
}
|
49
|
+
</script>
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>CodeMirror 2: Autocomplete Demo</title>
|
5
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
6
|
+
<script src="../lib/codemirror.js"></script>
|
7
|
+
<link rel="stylesheet" href="../theme/night.css">
|
8
|
+
<script src="../mode/javascript/javascript.js"></script>
|
9
|
+
<link rel="stylesheet" href="../css/docs.css">
|
10
|
+
|
11
|
+
<style type="text/css">
|
12
|
+
.completions {
|
13
|
+
position: absolute;
|
14
|
+
z-index: 10;
|
15
|
+
overflow: hidden;
|
16
|
+
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
17
|
+
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
18
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
19
|
+
}
|
20
|
+
.completions select {
|
21
|
+
background: #fafafa;
|
22
|
+
outline: none;
|
23
|
+
border: none;
|
24
|
+
padding: 0;
|
25
|
+
margin: 0;
|
26
|
+
font-family: monospace;
|
27
|
+
}
|
28
|
+
.CodeMirror {
|
29
|
+
border: 1px solid #eee;
|
30
|
+
}
|
31
|
+
</style>
|
32
|
+
</head>
|
33
|
+
<body>
|
34
|
+
<h1>CodeMirror 2: Autocomplete demo</h1>
|
35
|
+
|
36
|
+
<form><textarea id="code" name="code">
|
37
|
+
function getCompletions(token, context) {
|
38
|
+
var found = [], start = token.string;
|
39
|
+
function maybeAdd(str) {
|
40
|
+
if (str.indexOf(start) == 0) found.push(str);
|
41
|
+
}
|
42
|
+
function gatherCompletions(obj) {
|
43
|
+
if (typeof obj == "string") forEach(stringProps, maybeAdd);
|
44
|
+
else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
|
45
|
+
else if (obj instanceof Function) forEach(funcProps, maybeAdd);
|
46
|
+
for (var name in obj) maybeAdd(name);
|
47
|
+
}
|
48
|
+
|
49
|
+
if (context) {
|
50
|
+
// If this is a property, see if it belongs to some object we can
|
51
|
+
// find in the current environment.
|
52
|
+
var obj = context.pop(), base;
|
53
|
+
if (obj.className == "js-variable")
|
54
|
+
base = window[obj.string];
|
55
|
+
else if (obj.className == "js-string")
|
56
|
+
base = "";
|
57
|
+
else if (obj.className == "js-atom")
|
58
|
+
base = 1;
|
59
|
+
while (base != null && context.length)
|
60
|
+
base = base[context.pop().string];
|
61
|
+
if (base != null) gatherCompletions(base);
|
62
|
+
}
|
63
|
+
else {
|
64
|
+
// If not, just look in the window object and any local scope
|
65
|
+
// (reading into JS mode internals to get at the local variables)
|
66
|
+
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
|
67
|
+
gatherCompletions(window);
|
68
|
+
forEach(keywords, maybeAdd);
|
69
|
+
}
|
70
|
+
return found;
|
71
|
+
}
|
72
|
+
</textarea></form>
|
73
|
+
|
74
|
+
<p>Press <strong>ctrl-space</strong> to activate autocompletion. See
|
75
|
+
the <a href="complete.js">code</a> to figure out how it works.</p>
|
76
|
+
|
77
|
+
<script src="complete.js"></script>
|
78
|
+
</body>
|
79
|
+
</html>
|