-
Notifications
You must be signed in to change notification settings - Fork 0
/
editor.html
51 lines (41 loc) · 2.06 KB
/
editor.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
<html>
<head>
<title>EduVideoScript</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="editor.css">
<script type="text/javascript" src="../evs.js"></script>
<script type="text/javascript" src="../commands.js"></script>
<script type="text/javascript" src="commandcolors.js"></script>
<script type="text/javascript" src="editor.js"></script>
<script type="text/javascript" src="defaultProgram.js"></script>
<script type="text/javascript">
"use strict";
//static HTML elements of editor page
let FILE_HEADER_BUTTON, GRAPHICAL_HEADER_BUTTON, JSON_HEADER_BUTTON, RUN_HEADER_BUTTON, MAIN_FIELD;
let currentEditCode = new EditCode(DEFAULT_PROGRAM);
// load static HTML elements
function initElements() {
FILE_HEADER_BUTTON = document.getElementById("fileHeaderButton");
GRAPHICAL_HEADER_BUTTON = document.getElementById("graphicalEditorHeaderButton");
JSON_HEADER_BUTTON = document.getElementById("JSONEditorHeaderButton");
RUN_HEADER_BUTTON = document.getElementById("runHeaderButton");
MAIN_FIELD = document.getElementById("mainField");
}
onload = function() {
initElements();
switchToGraphicalEditor(currentEditCode);
}
</script>
</head>
<body ondragover="event.preventDefault()" ondrop="event.preventDefault()">
<header class="header">
<input type="button" id="fileHeaderButton" class="headerButton" value="file" onclick="switchToFileOptions(currentEditCode)"/><!--
--><input type="button" id="graphicalEditorHeaderButton" class="headerButton" value="graphical editor" onclick="switchToGraphicalEditor(currentEditCode)"/><!--
--><input type="button" id="JSONEditorHeaderButton" class="headerButton" value="json editor" onclick="switchToJSONEditor(currentEditCode)"/><!--
--><input type="button" id="runHeaderButton" class="headerButton" value="run" onclick="switchToRunMode(currentEditCode)"/>
</header>
<main id="mainField" class="mainField">
Loading...
</main>
</body>
</html>