Open gzuidhof opened 3 years ago
fyi I'm actively working on this (outside of my day job), trying to put some care into how options might be passed to/from NodeViews.
In addition to your async KaTeX use case, I want to support MathJax with the next release. Right now some of the KaTeX-specific design decisions are tangled up with the NodeView code. MathJax is a bit of a behemoth, so I'm trying to understand the various ways that MathJax (as well as KaTeX or other math renderers) might be included in an application.
Hi benrbray,
Thank you for this library, I have integrated it into Starboard Notebook (you can try it here). Before the NPM package was released I vendored all the code (read: copy pasted), but now that it's out I would love to get rid of my own version.
I was only able to remove about half of the code: in Starboard Notebook I load as much stuff asynchronously as possible to keep the initial load and render time fast, KaTeX included.
Basically the only change I made is this in NodeView:
I don't know the best way to fit this into the library.
Perhaps instead of importing katex directly one could pass an object with this signature:
I saw in another issue that you wanted to support Mathjax as well, this would be a step towards supporting that too.