Show More
@@ -21,6 +21,11 function($, | |||
|
21 | 21 | |
|
22 | 22 | this.codemirror = CodeMirror($(this.selector)[0]); |
|
23 | 23 | |
|
24 | // It appears we have to set commands on the CodeMirror class, not the | |
|
25 | // instance. I'd like to be wrong, but since there should only be one CM | |
|
26 | // instance on the page, this is good enough for now. | |
|
27 | CodeMirror.commands.save = $.proxy(this.save, this); | |
|
28 | ||
|
24 | 29 | this.save_enabled = false; |
|
25 | 30 | }; |
|
26 | 31 | |
@@ -46,9 +51,6 function($, | |||
|
46 | 51 | that.save_enabled = false; |
|
47 | 52 | } |
|
48 | 53 | ); |
|
49 | cm.setOption("extraKeys", { | |
|
50 | "Ctrl-S": $.proxy(this.save, this), | |
|
51 | }); | |
|
52 | 54 | }; |
|
53 | 55 | |
|
54 | 56 | Editor.prototype.save = function() { |
General Comments 0
You need to be logged in to leave comments.
Login now