[IPython-dev] Playing with cells in the notebook... and some problems.

Matthias BUSSONNIER bussonniermatthias at gmail.com
Wed Aug 7 03:40:15 EDT 2013

Le 7 août 2013 à 07:23, Damián Avila a écrit :

> Ah... if I "wrapinner", the cell is executed without problems, but I 
> need to wrap outer, I mean add html elements enclosing the current cell...

Cell object are attached to a DOM element, if yo wrap outer, you "change" this element
so the binding do not exist anymore.

it's  like this slight difference between (teleporting someone), and (cloning him and burn the original immediately)
from an outsider perspective it's the same.

You could probably re-attach cell.element to the wrapped tag, I think it is doable. But code mirror might also 
have some assumption on the DOM.

I don't quite remember how are cell inserted and everything, but I would try when wrapping to do 
	create the sections 
	create n <div>
	cell.from_json on each of theses div.


More information about the IPython-dev mailing list