Fix: merge conflict
[myslice.git] / to-be-integrated / third-party / codemirror-3.15 / mode / smalltalk / index.html
1 <!doctype html>
2 <html>
3   <head>
4     <meta charset="utf-8">
5     <title>CodeMirror: Smalltalk mode</title>
6     <link rel="stylesheet" href="../../lib/codemirror.css">
7     <script src="../../lib/codemirror.js"></script>
8     <script src="../../addon/edit/matchbrackets.js"></script>
9     <script src="smalltalk.js"></script>
10     <link rel="stylesheet" href="../../doc/docs.css">
11     <style>
12       .CodeMirror {border: 2px solid #dee; border-right-width: 10px;}
13       .CodeMirror-gutter {border: none; background: #dee;}
14       .CodeMirror-gutter pre {color: white; font-weight: bold;}
15     </style>
16   </head>
17   <body>
18     <h1>CodeMirror: Smalltalk mode</h1>
19
20 <form><textarea id="code" name="code">
21
22     This is a test of the Smalltalk code
23 "
24 Seaside.WAComponent subclass: #MyCounter [
25     | count |
26     MyCounter class &gt;&gt; canBeRoot [ ^true ]
27
28     initialize [
29         super initialize.
30         count := 0.
31     ]
32     states [ ^{ self } ]
33     renderContentOn: html [
34         html heading: count.
35         html anchor callback: [ count := count + 1 ]; with: '++'.
36         html space.
37         html anchor callback: [ count := count - 1 ]; with: '--'.
38     ]
39 ]
40
41 MyCounter registerAsApplication: 'mycounter'
42 </textarea></form>
43
44     <script>
45       var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
46         lineNumbers: true,
47         matchBrackets: true,
48         mode: "text/x-stsrc",
49         indentUnit: 4
50       });
51     </script>
52
53     <p>Simple Smalltalk mode.</p>
54
55     <p><strong>MIME types defined:</strong> <code>text/x-stsrc</code>.</p>
56   </body>
57 </html>