##// END OF EJS Templates
split adds new cell above, rather than below...
MinRK -
Show More
@@ -1161,15 +1161,15 var IPython = (function (IPython) {
1161 var texta = cell.get_pre_cursor();
1161 var texta = cell.get_pre_cursor();
1162 var textb = cell.get_post_cursor();
1162 var textb = cell.get_post_cursor();
1163 if (cell instanceof IPython.CodeCell) {
1163 if (cell instanceof IPython.CodeCell) {
1164 cell.set_text(texta);
1164 cell.set_text(textb);
1165 var new_cell = this.insert_cell_below('code');
1165 var new_cell = this.insert_cell_above('code');
1166 new_cell.set_text(textb);
1166 new_cell.set_text(texta);
1167 } else if (cell instanceof IPython.MarkdownCell) {
1167 } else if (cell instanceof IPython.MarkdownCell) {
1168 cell.set_text(texta);
1168 cell.set_text(textb);
1169 cell.render();
1169 cell.render();
1170 var new_cell = this.insert_cell_below('markdown');
1170 var new_cell = this.insert_cell_above('markdown');
1171 new_cell.edit(); // editor must be visible to call set_text
1171 new_cell.edit(); // editor must be visible to call set_text
1172 new_cell.set_text(textb);
1172 new_cell.set_text(texta);
1173 new_cell.render();
1173 new_cell.render();
1174 }
1174 }
1175 };
1175 };
General Comments 0
You need to be logged in to leave comments. Login now