-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
93 lines (78 loc) · 1.95 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!doctype html>
<html>
<head>
<title>Sandblocks Text</title>
</head>
<body>
<h3>Squeak Demo</h3>
<squeak-browser></squeak-browser>
<h3>Smalltalk Demo</h3>
<div id="root">
<sb-editor
text="init
| destruct1 firstField secondField |
destruct1 := self call.
firstField := destruct1 first.
secondField := destruct1 second.
self yourself"
language="smalltalk"
extensions="smalltalk:base base:base smalltalk:destructuringAssignment"
></sb-editor>
</div>
<h3>Javascript Demo</h3>
<sb-editor
extensions=""
text='console.log(sbWatch(123, 12398482))
function a() {
sqCompile("Behavior", "initialize ^ self new")
}
a(22312, 3456)
class MyCls {
func(a, bdasdasdas, c) {}
}
let index = 0
Editor.registerKeyMap({
undo: "Ctrl-z",
redo: "Ctrl-Z",
save: "Ctrl-s",
cut: "Ctrl-x",
copy: "Ctrl-c",
dismiss: "Escape",
selectNodeUp: "Ctrl-ArrowUp",
selectNodeDown: "Ctrl-ArrowDown",
insertFirstArg: "Alt-1",
insertSecondArg: "Alt-" + index++,
insertThirdArg: "Alt-3",
insertFourthArg: "Alt-4",
insertFifthArg: "Alt-5",
wrapWithWatch: "Ctrl-q",
printIt: "Ctrl-p",
});
'
language="javascript"
></sb-editor>
<h3>Tla+ Demo</h3>
<sb-editor
text="---- MODULE Test ----
op ==
(* This is a comment
over multiple lines *)
CASE 1 -> 2
[] 3 -> 4
(**************************************************************************)
(* Commonly you would also see comments like this in specs *)
(* Also spanning over multiple lines *)
(**************************************************************************)
[] OTHER -> 5
====
"
language="tlaplus"
extensions="tlaplus:base base:base"
></sb-editor>
<link rel="stylesheet" href="view/editor-style.css" />
<script type="module">
import { Editor } from "./editor.js";
Editor.init();
</script>
</body>
</html>