I would like to make a view-only mode for Jupyter notebooks on the file system.
Either the notebooks can be opened in their own tab, or embedded like
![[notebook.ipynb]]
much like images or PDFs.
I made a NodeJS prototype that loads a notebook file (which is a special JSON) and crudely renders it to HTML. Is there anyway I can hook this up to my desired use cases of embedding or opening in an a tab on its own? Or, failing that, maybe a code fence solution like
Thanks. Is the data property then the JSON contents of the file? And the idea would be that my implementation of the abstract method setViewData(data, clear) would do my transformation to HTML, walk the workspace tree to the current tab, and call createEl on something?
That example looks like a nice superset of what I want to do, thanks. I think lines 27 and 28 of main.ts answer my questions about registering. And I guess, looking at the creation of the KetcherReact component in setViewData in ketView.tsx suggests that I’m right that this.data is the JSON, and setViewData can use this.containerEl to generate my HTML.
I’ll go work on this when I next have time, and then post back here only if I have problems; else, this is probably closed, thanks.