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>
|
<div><label for="enabled" id="enabled-label"></label><input type="checkbox" id="enabled"></div>
|
||||||
</section>
|
</section>
|
||||||
<button id="to-mozilla"></button><img id="to-mozilla-help" src="help.png"><br><br>
|
<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>
|
<a href="manage.html"><button id="cancel-button"></button></a>
|
||||||
<div id="options">
|
<div id="options">
|
||||||
<h2 id="options-heading"></h2>
|
<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
|
var editors = [] // array of all CodeMirror instances
|
||||||
// replace given textarea with the CodeMirror editor
|
// replace given textarea with the CodeMirror editor
|
||||||
function setupCodeMirror(textarea) {
|
function setupCodeMirror(textarea) {
|
||||||
|
CodeMirror.commands.save = function(cm) { save() }
|
||||||
var cm = CodeMirror.fromTextArea(textarea, {
|
var cm = CodeMirror.fromTextArea(textarea, {
|
||||||
mode: 'css',
|
mode: 'css',
|
||||||
lineNumbers: true,
|
lineNumbers: true,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user