logseq-plugin-github-get icon indicating copy to clipboard operation
logseq-plugin-github-get copied to clipboard

Embed Jupyter Notebook

Open kicka42 opened this issue 3 years ago • 2 comments

Would it be possible to embed Jupyter Notebook files? As I see CodeMirror 5 does not support Jupyter Notebook.

kicka42 avatar Nov 21 '22 18:11 kicka42

As you say, CodeMirror doesn't support Jupyter notebook rendering and my plugin uses Logseq's code renderer which is CodeMirror. Jupyter notebooks really require a language kernel to provide the code highlighting features. You could look at using one of the many Jupyter notebook services that can be embedded - use the Logseq HTML embed command and copy the embed code from the Jupyter notebook service. For example, Deepnote allows this - see here https://deepnote.com/docs/sharing-and-embedding-blocks

mandpd avatar Nov 25 '22 02:11 mandpd

Thanks for the answer! The thing is I would love to have the possibility to search inside embedded code. It did not work when I embedded Jupyter Notebook files with DeepNote. However, I can do it with your plugin and *.py files. So maybe the only solution, for now, is just to convert ipynb files to py.

kicka42 avatar Nov 25 '22 12:11 kicka42