forked from wavedrom/wavedrom.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editor.html
79 lines (76 loc) · 4.35 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
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
<html>
<head>
<meta charset="UTF-8">
<title>WaveDrom Editor</title>
<link rel="shortcut icon" href="images/favicon.ico"/>
<link href="https://fonts.googleapis.com/css?family=Ubuntu+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/codemirror.css">
<link rel="stylesheet" href="css/dialog.css">
<link rel="stylesheet" href="css/main.css">
<link rel="manifest" href="./manifest.json">
<!-- Expires: 2020-09-29 -->
<meta http-equiv="origin-trial" content="Am6ESaxxizmFrymZ2dfVBjueIKm0EM8AXy67E5TvX0TdHsAfjD6dVS58HwNdotsiKuI6Z0xzpEd02QFBbLO5HgYAAABqeyJvcmlnaW4iOiJodHRwczovL3dhdmVkcm9tLmNvbTo0NDMiLCJmZWF0dXJlIjoiTmF0aXZlRmlsZVN5c3RlbTIiLCJleHBpcnkiOjE2MDE0MjM5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==">
<script src="scripts/codemirror-compressed.js"></script>
<script src="scripts/lodash.min.js"></script>
<script src="skins/default.js"></script>
<script src="skins/dark.js"></script>
<script src="skins/narrow.js"></script>
<script src="skins/lowkey.js"></script>
<script src="wavedrom.min.js"></script>
<script src="editor.js"></script>
</head>
<body onload="WaveDrom.editorInit()" onclick="WaveDrom.menuOpen(event)">
<div id="content">
<div class="toolbar">
<img class="button" alt="Memu" id="Menu" title="Menu" src="images/ic_menu.png"/>
</div>
<div style="display:none;" class="menu" id="menux">
<div id="version" align="right">v?.?.?</div>
<ul>
<!--li>New</li>
<li>Open...</li>
<li>Save</li-->
<li onclick="WaveDrom.loadJSON(event)"> <img class="button" src="images/ic_upload_json.png"/> Load... </li>
<li onclick="WaveDrom.saveJSON(event)"> <img class="button" src="images/ic_download_json.png"/> Save As... </li>
<li onclick="WaveDrom.saveSVG(event)"> <img class="button" src="images/ic_download_svg.png"/> Export SVG... </li>
<li onclick="WaveDrom.savePNG(event)"> <img class="button" src="images/ic_download_png.png"/> Export PNG... </li>
</ul>
<ul>
<li onclick="WaveDrom.editorState({rot:1})"> <img class="button" src="images/ic_rot.png" /> Rotate Layout </li>
<li onclick="WaveDrom.editorState({per:1})"> <img class="button" src="images/ic_persent.png" /> Proportions </li>
<li onclick="WaveDrom.setFullURL()"> <img class="button" src="images/ic_url.png"/> Expand URL </li>
<li onclick="WaveDrom.gotoWaveDromGuide()" id="WaveDromGuide"> <img class="button" src="images/ic_guide.png"/> WaveDrom Guide </li>
<li onclick="WaveDrom.gotoWaveDromHome()" id="WaveDromHome"> <img class="button" src="images/ic_logo.png"/> on GitHub </li>
<li style="display:none;">Exit</li>
</ul>
</div>
<input style="display:none;" id="fileDialogLoad" type="file" />
<input style="display:none;" id="fileDialogSave" type="file" nwsaveas="wavedrom.json" />
<input style="display:none;" id="fileDialogSVG" type="file" nwsaveas="wavedrom.svg" />
<input style="display:none;" id="fileDialogPNG" type="file" nwsaveas="wavedrom.png" />
<div id="SVG"><div id="SVGScroll"><div id="WaveDrom_Display_0"></div></div></div>
<div id="TXT"><textarea id="InputJSON_0"></textarea></div>
</div>
<script src="init.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-21660728-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-21660728-3');
</script>
<script>
// define a handler to catch keyboard shortcuts
document.onkeyup = function(e) {
// key code 83 = 's'
if (e.ctrlKey && e.which == 83) {
WaveDrom.saveJSON();
}
// key code 79 = 'o'
else if (e.ctrlKey && e.which == 79) {
WaveDrom.loadJSON();
}
};
</script>
</body>
</html>