We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 802d41d commit 55dae62Copy full SHA for 55dae62
demo/emacs.html
@@ -43,8 +43,12 @@ <h1>CodeMirror 2: Emacs bindings demo</h1>
43
or open a new window.</p>
44
45
<script>
46
- CodeMirror.commands.save = function(){alert("Saving");};
47
- CodeMirror.fromTextArea(document.getElementById("code"), {
+ CodeMirror.commands.save = function() {
+ var elt = editor.getWrapperElement();
48
+ elt.style.background = "#def";
49
+ setTimeout(function() { elt.style.background = ""; }, 300);
50
+ };
51
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
52
lineNumbers: true,
53
mode: "text/x-csrc",
54
keyMap: "emacs"
0 commit comments