MathBox.js icon indicating copy to clipboard operation
MathBox.js copied to clipboard

Is there a way to use MathBox.js from file:// ?

Open silgon opened this issue 11 years ago • 2 comments

I noticed the first part on your documents is something like:

document.getElementById('info').innerHTML = "Sorry. This example does not work when accessed using file://. Please use an http:// host and try again.";

And well, I tested and it doesn't work in with file:// and I would like to know if there's a workaround for this. Because I will try to implement MathBox with org-mode on emacs, and for the best use, you always open your files with file:// because since it's only an HTML file, maybe with some javascript and css, you don't need a server. Anyway, I'll appreciate your input. =)

silgon avatar Jul 28 '14 10:07 silgon

This is a security feature so that, for example, an html file someone sends you can't look for ~/passwords.txt and send that to their server. Some browsers allow you to disable this, but it's probably best to just start up any number of basic http servers that will serve files locally. For example, python has a nice one:

python -m SimpleHTTPServer 8000

Then fire up your browser an go to http://localhost:8000

rreusser avatar Oct 22 '14 15:10 rreusser

+1 this would be great, especially for use within a WebView. Also @unconed are you still actively working on this? Or is this intended to be superseded by MathBox2?

borismus avatar May 31 '15 21:05 borismus