add server upload buttons and Ctrl-S bindings to mode_editor

in combination with PUT support in ./static.py (or whatever other web server)
this allows people to save both the highlighting rules and the demo documents right
from the mode editor for a better workflow.
This commit is contained in:
Matthias S. Benkmann 2014-12-07 17:38:15 +01:00
commit 8919b113d1
4 changed files with 73 additions and 2 deletions

View file

@ -19,7 +19,7 @@
border-bottom: solid 1px;
}
.separator-h {
padding: 0 20px;
padding: 0 10px;
}
#closeBtn {
background: rgba(245, 146, 146, 0.5);
@ -59,6 +59,7 @@
<select id="modeEl" size="1"></select>
<input type="button" value="&#10227;" title="sync" id="syncToMode"></select>
<span id="tablist"></span>
<input type="button" value="Upload" id="uploadToServer1"></select>
<span class="separator-h"></span>
<label for="autorunEl">live preview</label>
<input type="checkbox" label="autorun" id="autorunEl" checked>
@ -70,6 +71,7 @@
<label for="themeEl">Theme</label>
<select id="themeEl" size="1" value="textmate"></select>
<span class="separator-h"></span>
<input type="button" value="Upload" id="uploadToServer2"></select>
<label for="doc">Document</label>
<select id="doc" size="1"></select>
</div>