/
testEditor.html
33 lines (25 loc) · 1.1 KB
/
testEditor.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
<!DOCTYPE html>
<html>
<head><title>EDITOR TEST</title>
<!-- necessary includes for CodeMirror -->
<link rel="stylesheet" href="lib/codemirror-3.1/lib/codemirror.css">
<script src="lib/codemirror-3.1/lib/codemirror.js"></script>
<script src="lib/codemirror-3.1/mode/javascript/javascript.js"></script>
<link rel="stylesheet" href="lib/codemirror-3.1/theme/vibrant-ink.css">
<script src="lib/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="styles/game.css">
</head>
<body style="background: white;">
<h1>Editor Test</h1>
<textarea id='myTextarea'>Some text</textarea>
<script src="scripts/codeEditor.js"></script>
<script>
var editor = new CodeEditor('myTextarea', 800,500);
console.log("Done creating editor");
$.get('levels/blocks.jsx', function (text) {
editor.loadCode(text);
});
//setTimeout(function () { $.get('levels/levelThree.js', function (text) { editor.loadCode(text);})}, 3000);
</script>
</body>
</html>