scribble-math/static/main.js
Emily Eisenberg adb8b5d671 Rename everything to KaTeX
Summary: Rename all instances of mjlite -> katex

Test Plan: Run the local server, make sure things still work.

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D2977
2013-07-10 14:08:50 -07:00

17 lines
382 B
JavaScript

window.onload = function() {
var input = document.getElementById("input");
var math = document.getElementById("math");
reprocess();
if ("oninput" in input) {
input.addEventListener("input", reprocess, false);
} else {
input.attachEvent("onkeyup", reprocess);
}
function reprocess() {
katex.process(input.value, math);
}
};