Merge pull request #46 from tophf/hotkeys-in-edit

Edit style: add Ctrl-S hotkey to save the style
This commit is contained in:
Jason Barnabe 2015-03-03 14:36:50 -06:00
commit 110c31d495
2 changed files with 2 additions and 1 deletions

View File

@ -156,7 +156,7 @@
<div><label for="enabled" id="enabled-label"></label><input type="checkbox" id="enabled"></div>
</section>
<button id="to-mozilla"></button><img id="to-mozilla-help" src="help.png"><br><br>
<button id="save-button"></button>
<button id="save-button" title="Ctrl-S"></button>
<a href="manage.html"><button id="cancel-button"></button></a>
<div id="options">
<h2 id="options-heading"></h2>

View File

@ -15,6 +15,7 @@ sectionTemplate.innerHTML = '<label>' + t('sectionCode') + '</label><textarea cl
var editors = [] // array of all CodeMirror instances
// replace given textarea with the CodeMirror editor
function setupCodeMirror(textarea) {
CodeMirror.commands.save = function(cm) { save() }
var cm = CodeMirror.fromTextArea(textarea, {
mode: 'css',
lineNumbers: true,