bia-bob
bia-bob copied to clipboard
More flexibility with Cells
... would be possible using code like this:
from ipylab import JupyterFrontEnd
app = JupyterFrontEnd()
app.commands.execute("notebook:insert-cell-below")
app.commands.execute("notebook:replace-selection", {"text": result})
Source: https://github.com/kolibril13/jupyter-tldraw/blob/b4af7d98c86ec24c026e80ec927b6ef270d42d49/src/tldraw/init.py#L142