jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.73k stars 4.97k forks source link

Inline Whiteboard #1999

Open pylang opened 7 years ago

pylang commented 7 years ago

I do almost everything in the notebooks, but I wish I could make quick sketches and save them too, as I do in physical notebooks. I think jupyter notebooks would be unlike any other if they supported handwritten sketches.

I imagine something like a "canvas" cell type, that triggers a simple javascript whiteboard in place of the cell and accepts cursor inputs for sketching. For example, a cell that was able to produce the following:

2016-12-20 18_18_21-untitled - paint

Based on this SO Post, there appear to be ways to implement simple JS-like whiteboards.

Before TLDR; is this a feasible request in the next versions of the notebook/jupyterlab? Has this feature has been reviewed before? Thank you.

rgbkrk commented 7 years ago

That would be super neat! I've wanted this as well. On a Windows surface (pro|book), it would be nice to be able to pop open an area to start drawing in a similar fashion to how we do in OneNote.

UI wise, I'd love to be able to write directly into a new cell as a canvas area and save that as image/png. It's up to a notebook implementation to handle this as they see fit.

As for implementation, I think it would be nice if there was a generic yet specified field for mime bundles similar to display_data from outputs. Something like:

cell_type: "mimebundle",
data: {
  "image/png": ...
}

Clearly I'm spitballing here. I know I opened a related issue for being able to put text/html on the page without requiring magics (for the benefit of other kernels than IPython). Basically, some way to flip between edit and view mode for a singular mimetype.

rgbkrk commented 7 years ago

Related issue: https://github.com/jupyter/notebook/issues/1123

pylang commented 7 years ago

I second @rgbkrk's idea on saving to png.

pylang commented 7 years ago

Re: editing canvas-like images in notebooks https://github.com/uclmr/egal

sivark commented 7 years ago

I came hear to suggest the same feature, only to notice that a discussion is already underway! This feature would take jupyter-notebook further along in the direction of being a versatile "notebook".

evertheylen commented 7 years ago

I too would like to draw some sketches within the notebook. In my search, I've encountered literallycanvas which seems to be a perfect fit (various ways of drawing, adding text, JSON load/store, etc).

n1000 commented 6 years ago

Not adding anything constructive to this discussion, just saying it would be awesome if this were added... 👍

alxgom commented 4 years ago

Just another person requesting for this. I have to teach at the uni and I think having a mix of plotting/interactivity, with latex capabilitys and the hability to do a hand written lecture would be perfect.

Alchemication commented 4 years ago

Brilliant idea. Came here to flag same!

alkuzman commented 4 years ago

+1

khoffLSU commented 4 years ago

This would really make Jupyter a goto engineering and computation notebook. Stylus integration is key.

NickAlger commented 4 years ago

Yes +1. This would be awesome. The extension egal kinda does this, but it doesn't work very well

srkunze commented 2 years ago

+1

recently saw this https://twitter.com/tldraw/status/1461011977791234051

or this

https://github.com/excalidraw/excalidraw

williamstein commented 2 years ago

Of related interest, I recently implemented a Jupyter whiteboard for CoCalc: https://doc.cocalc.com/whiteboard.html

It's a basic whiteboard and there's a Jupyter button off to the left that you can click on to create a new Jupyter code cell. The result is that you get a whiteboard with Jupyter code cells in it, which is kind of fun to use as an alternative UI to Jupyter notebooks. This is sorted of inverted from the question of this ticket though, which is having whiteboards in a notebook...

mattveraldi commented 10 months ago

Any news? I'd like that feature too

jtpio commented 9 months ago

This extension by @kolibril13 looks pretty good too: https://github.com/kolibril13/jupyter-tldraw

In any case, such functionality would probably still be implemented as an extension for the time being. So we could close this issue, and maybe link the currently available options in the top comment?

jtpio commented 9 months ago

Note the same issue in JupyterLab may have more context and pointers: https://github.com/jupyterlab/jupyterlab/issues/9194