Method to show hide linenumber of cell

mostly convenience methods to wrap codemirror one,
plus doc and 1 doc fix (missing curly bracket)
Matthias BUSSONNIER 13 years ago
parent 20071271bf
commit 70713da4d4

@ -226,6 +226,17 @@ var IPython = (function (IPython) {
}
};
/**
* Show/Hide CodeMirror LineNumber
* @method show_line_number
*
* @param value {Bool} show (true), or hide (false) the line number in CodeMirror
**/
Cell.prototype.show_line_numbers = function (value) {
this.code_mirror.setOption('lineNumbers', value);
this.code_mirror.refresh();
};
/**
* Toggle CodeMirror LineNumber
* @method toggle_line_numbers

@ -40,7 +40,7 @@ var IPython = (function (IPython) {
* {
* label:'my button',
* icon:'ui-icon-disk',
* callback:function(){alert('hoho'),
* callback:function(){alert('hoho')},
* id : 'my_button_id', // this is optional
* },
* {

Loading…
Cancel
Save