Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline version #6

Open
fredbt opened this issue Jun 28, 2018 · 11 comments
Open

Offline version #6

fredbt opened this issue Jun 28, 2018 · 11 comments

Comments

@fredbt
Copy link

fredbt commented Jun 28, 2018

Hi there!

What would it take to use this library offline? Right now it needs to call the MathJax.js script remotely.

Thanks,
Fred

@mrded
Copy link
Contributor

mrded commented Sep 5, 2018

Do you know how to attach an external library as a plaintext into webview?

@calvinkei
Copy link
Owner

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

@mrded
Copy link
Contributor

mrded commented Sep 5, 2018

It doesn't look possible to me. Even you embed MathJax.js, it still downloads additional fonts and extensions from the internet.

@mrded
Copy link
Contributor

mrded commented Sep 5, 2018

You can probably download whole MathJax lib into ./assets and share it to the webview via baseUrl.

@matei-radu
Copy link

matei-radu commented Oct 12, 2018

@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.

@mrded
Copy link
Contributor

mrded commented Oct 12, 2018

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.

@matei-radu
Copy link

matei-radu commented Oct 12, 2018

Oh, that's unfortunate. Thanks for clarifying.

@truongluuxuan
Copy link

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.

@mrded
Copy link
Contributor

mrded commented May 9, 2019

@truongluuxuan I'm sorry, I'm not in a context of this problem any longer.

@harsh-kukreja
Copy link

Hey @truongluuxuan were you able to load mathjax offline?

@truongluuxuan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants