Edit style: add Ctrl-S hotkey to save the style
This commit is contained in:
parent
b4173d68f6
commit
e8c5c6dfd4
|
@ -152,7 +152,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>
|
||||
|
|
1
edit.js
1
edit.js
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user