Open kolibril13 opened 1 year ago
What about the result of TldrawMakeStaticSVG and similar functions? How would I get those to stick?
First version of saving and loading drawings is now possible withTldrawMakeStaticTldraw
But that's not the final solution. Re-rendering the whole widget with interactive canvers after notebook restart is currently not possible, but that's a jupyterlab issue that might get solved at some point https://github.com/jupyterlab/jupyterlab/issues/15361
I also have the idea to convert drawings to static formats like TldrawMakeStaticSVG
and TldrawMakeStaticPNG
, I've made an issue for that here: https://github.com/kolibril13/jupyter-tldraw/issues/16
At the moment, closing and reopening a notebook will delete all drawings from a canvas. Also, re-executing a cell will delete all drawings from a canvas.
Current workaround: Copy the drawings to the clipboard, re-execute the cell and paste it into the fresh canvas.
Saving the state to the metadata of the notebook cell would be nice to have! E.g. buttons for
Further idea: auto-saving the state for every interaction.
For reference: there is a similar button for ipywidgets