diff options
author | Nivesh Rajbhandari | 2012-02-20 11:14:44 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-20 11:14:44 -0800 |
commit | abf78e2d7a97d295ce5a1c425fd359d47379137e (patch) | |
tree | d08c91bd2aef31e6325e0b499b2ffc390018bec6 /imports/codemirror/mode/smalltalk/index.html | |
parent | e80a79bff57fecf3aa9b869d8ed2de5fd815287c (diff) | |
parent | e23708721a71ca4c71365f5f8e8ac7d6113926db (diff) | |
download | ninja-abf78e2d7a97d295ce5a1c425fd359d47379137e.tar.gz |
Merge branch 'refs/heads/ninja-internal' into ToolFixes
Diffstat (limited to 'imports/codemirror/mode/smalltalk/index.html')
-rwxr-xr-x | imports/codemirror/mode/smalltalk/index.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/imports/codemirror/mode/smalltalk/index.html b/imports/codemirror/mode/smalltalk/index.html new file mode 100755 index 00000000..8a85c39e --- /dev/null +++ b/imports/codemirror/mode/smalltalk/index.html | |||
@@ -0,0 +1,55 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: Smalltalk mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="smalltalk.js"></script> | ||
8 | <link rel="stylesheet" href="../../doc/docs.css"> | ||
9 | <style> | ||
10 | .CodeMirror {border: 2px solid #dee; border-right-width: 10px;} | ||
11 | .CodeMirror-gutter {border: none; background: #dee;} | ||
12 | .CodeMirror-gutter pre {color: white; font-weight: bold;} | ||
13 | </style> | ||
14 | </head> | ||
15 | <body> | ||
16 | <h1>CodeMirror: Smalltalk mode</h1> | ||
17 | |||
18 | <form><textarea id="code" name="code"> | ||
19 | " | ||
20 | This is a test of the Smalltalk code | ||
21 | " | ||
22 | Seaside.WAComponent subclass: #MyCounter [ | ||
23 | | count | | ||
24 | MyCounter class >> canBeRoot [ ^true ] | ||
25 | |||
26 | initialize [ | ||
27 | super initialize. | ||
28 | count := 0. | ||
29 | ] | ||
30 | states [ ^{ self } ] | ||
31 | renderContentOn: html [ | ||
32 | html heading: count. | ||
33 | html anchor callback: [ count := count + 1 ]; with: '++'. | ||
34 | html space. | ||
35 | html anchor callback: [ count := count - 1 ]; with: '--'. | ||
36 | ] | ||
37 | ] | ||
38 | |||
39 | MyCounter registerAsApplication: 'mycounter' | ||
40 | </textarea></form> | ||
41 | |||
42 | <script> | ||
43 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
44 | lineNumbers: true, | ||
45 | matchBrackets: true, | ||
46 | mode: "text/x-stsrc", | ||
47 | indentUnit: 4 | ||
48 | }); | ||
49 | </script> | ||
50 | |||
51 | <p>Simple Smalltalk mode.</p> | ||
52 | |||
53 | <p><strong>MIME types defined:</strong> <code>text/x-stsrc</code>.</p> | ||
54 | </body> | ||
55 | </html> | ||