Show More
@@ -226,6 +226,7 define([ | |||
|
226 | 226 | * true = ignore, false = don't ignore. |
|
227 | 227 | * @method handle_codemirror_keyevent |
|
228 | 228 | */ |
|
229 | ||
|
229 | 230 | CodeCell.prototype.handle_codemirror_keyevent = function (editor, event) { |
|
230 | 231 | |
|
231 | 232 | var that = this; |
@@ -41,10 +41,7 define([ | |||
|
41 | 41 | this.config = options.config; |
|
42 | 42 | |
|
43 | 43 | // we cannot put this as a class key as it has handle to "this". |
|
44 | var cm_overwrite_options = { | |
|
45 | onKeyEvent: $.proxy(this.handle_keyevent,this) | |
|
46 | }; | |
|
47 | var config = utils.mergeopt(TextCell, this.config, {cm_config:cm_overwrite_options}); | |
|
44 | var config = utils.mergeopt(TextCell, this.config); | |
|
48 | 45 | Cell.apply(this, [{ |
|
49 | 46 | config: config, |
|
50 | 47 | keyboard_manager: options.keyboard_manager, |
@@ -86,6 +83,7 define([ | |||
|
86 | 83 | inner_cell.append(this.celltoolbar.element); |
|
87 | 84 | var input_area = $('<div/>').addClass('input_area'); |
|
88 | 85 | this.code_mirror = new CodeMirror(input_area.get(0), this.cm_config); |
|
86 | this.code_mirror.on('keydown', $.proxy(this.handle_keyevent,this)) | |
|
89 | 87 | // The tabindex=-1 makes this div focusable. |
|
90 | 88 | var render_area = $('<div/>').addClass('text_cell_render rendered_html') |
|
91 | 89 | .attr('tabindex','-1'); |
General Comments 0
You need to be logged in to leave comments.
Login now