Hacker News new | ask | show | jobs
by bhl 2424 days ago
How is the text/data stored per cell? I tried building something similar to this based off cells in Jupyter notebooks, but one issue I encountered was with having a one-way binding from editor to render.

One problem with this is with to-do lists, where instead of having the user modifying the underlying text representation in the editor, I wanted the user to be able to check off an item via the rendered html. For this, it seems like I needed three components: an editor, a render, and a non-flat data model.

1 comments

The cell data is always stored as plain text, on the client side simply with an attribute. And you can only ever edit cells as text, so those issues never come up. I could see how the checkbox would be tough though because you'd have to decide which line they clicked on in the text representation.

I've thought about porting to Jupyter too, but the plugin system on JupyterLab is pretty involved, and you lose plain text storage on the server side.