Open fredbt opened 6 years ago
Do you know how to attach an external library as a plaintext into webview?
simplest way to just make it work is to copy paste the content of https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js to wrapMathjax
, but not sure what's the best practice for this
It doesn't look possible to me. Even you embed MathJax.js
, it still downloads additional fonts and extensions from the internet.
You can probably download whole MathJax
lib into ./assets
and share it to the webview via baseUrl
.
@calvinkei why not require Mathjax as an npm dependency (from npmjs) and inject it in the WebView using the injectedJavaScript
prop?
I'd be happy to give it a try and, if it works, make a PR over this weekend.
It's not as simple. Mathjax requires extra remote pluggins from they CDN. If you want to host it locally, you need to make a web server with these plugins, or build a version of Mathjax with all plugins included.
Oh, that's unfortunate. Thanks for clarifying.
Dear Mr @mrded , can you help me for this comment "You can probably download whole MathJax lib into ./assets and share it to the webview via baseUrl." I need Mathjax offline but can't.
@truongluuxuan I'm sorry, I'm not in a context of this problem any longer.
Hey @truongluuxuan were you able to load mathjax offline?
Hey @truongluuxuan were you able to load mathjax offline?
I don't know how to do that. I'm just wondering how can I run mathjax offline
Hi there!
What would it take to use this library offline? Right now it needs to call the MathJax.js script remotely.
Thanks, Fred