forked from jaelle/blockly-page-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
29 lines (28 loc) · 866 Bytes
/
index.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
<html>
<head>
<title>Ugly Page Editor</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
<!-- function that gets called once Blockly frame loads //-->
<script type="text/javascript">
window.blockly_loaded = function(blockly) {
return window.Blockly = blockly;
}
window.run_code = function() {
code = window.Blockly.JavaScript.workspaceToCode();
eval(code);
}
</script>
</head>
<body>
<h1 id="header">Ugly Page Editor</h1>
<div id="blockly_editor">
<!-- Blockly will be injected in the iframe below //-->
<iframe id="blockly" src="blockly.html" width="100%"></iframe>
</div>
<p id="description">Blockly is a Visual Programming Editor that allows people to
manipulate programs and code using "code blocks" instead of text.</p>
<button id="button_run" onclick="run_code()">
Run Code Block
</button>
</body>
</html>