|
|
|
|
@ -41,10 +41,7 @@ define([
|
|
|
|
|
this.config = options.config;
|
|
|
|
|
|
|
|
|
|
// we cannot put this as a class key as it has handle to "this".
|
|
|
|
|
var cm_overwrite_options = {
|
|
|
|
|
onKeyEvent: $.proxy(this.handle_keyevent,this)
|
|
|
|
|
};
|
|
|
|
|
var config = utils.mergeopt(TextCell, this.config, {cm_config:cm_overwrite_options});
|
|
|
|
|
var config = utils.mergeopt(TextCell, this.config);
|
|
|
|
|
Cell.apply(this, [{
|
|
|
|
|
config: config,
|
|
|
|
|
keyboard_manager: options.keyboard_manager,
|
|
|
|
|
@ -86,6 +83,7 @@ define([
|
|
|
|
|
inner_cell.append(this.celltoolbar.element);
|
|
|
|
|
var input_area = $('<div/>').addClass('input_area');
|
|
|
|
|
this.code_mirror = new CodeMirror(input_area.get(0), this.cm_config);
|
|
|
|
|
this.code_mirror.on('keydown', $.proxy(this.handle_keyevent,this))
|
|
|
|
|
// The tabindex=-1 makes this div focusable.
|
|
|
|
|
var render_area = $('<div/>').addClass('text_cell_render rendered_html')
|
|
|
|
|
.attr('tabindex','-1');
|
|
|
|
|
|