Split cell keyboard shortcut wired up. Merge markdown adds 2nd \n.

Brian E. Granger 13 years ago
parent 23b88a9a24
commit 740b7aa21b

@ -241,6 +241,11 @@ var IPython = (function (IPython) {
// Undo last cell delete = z
notebook.undelete();
return false;
} else if (event.which === 189 || event.which === 173) {
// how fun! '-' is 189 in Chrome, but 173 in FF and Opera
// Split cell = -
notebook.split_cell();
return false;
};
// If we havn't handled it, let someone else.
return true;

@ -1079,7 +1079,7 @@ var IPython = (function (IPython) {
cell.set_text(upper_text+'\n'+text);
} else if (cell instanceof IPython.MarkdownCell) {
cell.unrender();
cell.set_text(upper_text+'\n'+text);
cell.set_text(upper_text+'\n\n'+text);
cell.render();
};
this.delete_cell(index-1);
@ -1109,7 +1109,7 @@ var IPython = (function (IPython) {
cell.set_text(text+'\n'+lower_text);
} else if (cell instanceof IPython.MarkdownCell) {
cell.unrender();
cell.set_text(text+'\n'+lower_text);
cell.set_text(text+'\n\n'+lower_text);
cell.render();
};
this.delete_cell(index+1);

Loading…
Cancel
Save