Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 1
<!doctype html>
2
<title>CodeMirror: Smalltalk mode</title>
3
<meta charset="utf-8" />
4
<link rel=stylesheet href="../../doc/docs.css">
5
<link rel="stylesheet" href="../../lib/codemirror.css">
6
<script src="../../lib/codemirror.js"></script>
7
<script src="../../addon/edit/matchbrackets.js"></script>
8
<script src="smalltalk.js"></script>
9
<style>
10
    .CodeMirror {
11
        border: 2px solid #dee;
12
        border-right-width: 10px;
13
    }
14
 
15
    .CodeMirror-gutter {
16
        border: none;
17
        background: #dee;
18
    }
19
 
20
    .CodeMirror-gutter pre {
21
        color: white;
22
        font-weight: bold;
23
    }
24
</style>
25
<div id=nav>
26
    <a href="http://codemirror.net">
27
        <h1>CodeMirror</h1>
28
        <img id=logo src="../../doc/logo.png">
29
    </a>
30
    <ul>
31
        <li>
32
            <a href="../../index.html">Home</a>
33
            <li>
34
                <a href="../../doc/manual.html">Manual</a>
35
                <li>
36
                    <a href="https://github.com/codemirror/codemirror">Code</a>
37
    </ul>
38
    <ul>
39
        <li>
40
            <a href="../index.html">Language modes</a>
41
            <li>
42
                <a class=active href="#">Smalltalk</a>
43
    </ul>
44
</div>
45
<article>
46
    <h2>Smalltalk mode</h2>
47
    <form>
48
        <textarea id="code" name="code"> " This is a test of the Smalltalk code " Seaside.WAComponent subclass: #MyCounter [ | count | MyCounter class &gt;&gt; canBeRoot [ ^true ] initialize [ super initialize. count := 0. ] states [ ^{ self } ] renderContentOn: html [ html heading:
49
            count. html anchor callback: [ count := count + 1 ]; with: '++'. html space. html anchor callback: [ count := count - 1 ]; with: '--'. ] ] MyCounter registerAsApplication: 'mycounter' </textarea>
50
    </form>
51
    <script>
52
        var editor = CodeMirror.fromTextArea(document.getElementById("code"),
53
        {
54
            lineNumbers: true,
55
            matchBrackets: true,
56
            mode: "text/x-stsrc",
57
            indentUnit: 4
58
        });
59
    </script>
60
    <p>Simple Smalltalk mode.</p>
61
    <p>
62
        <strong>MIME types defined:</strong> <code>text/x-stsrc</code>.</p>
63
</article>