Open parmentelat opened 2 years ago
I have the same concern, it'd be a big benefit while I teach to be able to add cells at the end of the current slide.
Thanks for your help!
did a bit of reading about this; it feels like what's happening is
Notebook.prototype.insert_cell_at_index
see code hereNotebook.prototype._insert_element_at_index
see code herethis.get_cell_element(index).before(element);
see code herethis is where I lost track, it looks like this .before
method is a jquery one, not entirely sure; but that clearly suggests that the new DOM element is inserted before the next cell (and not after the current cell)
which is quite consistent with the observed behaviour, because: RISE does not in itself interfere with cell creation; it's mostly about transforming the 'flat' notebook structure into a slide-by-slide reveal structure so when a cell gets created in the middle of a slide, its element ends up in the right place it's kind of coincidental; however in the case of the last cell in a slide, the new element ends up in the wrong slide...
not quite sure how to fix it then; even more so as the classic notebook is frozen
ideas welcome...
if in slide mode I press e.g. 'Option-Enter', a new cell is created all right
except if I'm already on the last cell in the slide (no time at this point to say what with fragments and all, so for now assume there's no fragment); in that case the cell is created all right but it's not rendered in that slide, I have to toggle to notebook and back, to see the newly created cell
this of course is about the classic RISE