4 releases

new 0.2.0 Apr 11, 2025
0.1.3 Apr 6, 2025
0.1.2 Apr 4, 2025
0.1.0 Apr 4, 2025

#592 in Web programming

Download history 358/week @ 2025-04-02

358 downloads per month
Used in mathquill-leptos

GPL-2.0 license

15KB
211 lines

API Structure

Read the docs on the MathQuill struct, everything starts from there.

Contrived example

From their docs:

var answerSpan = document.getElementById('answer');
var answerMathField = MQ.MathField(answerSpan, {
  handlers: {
    edit: function() {
      var enteredMath = answerMathField.latex(); // Get entered math in LaTeX format
      checkAnswer(enteredMath);
    }
  }
});

This would translate to something like:

If you don't want the field to be editable, you can use a static field and manually set the latext content to be whatever you want, like this:

See the examples directory for more information


MathQuill JS

An idiomatic Rust wrapper for the MathQuill JavaScript library. Builds upon mathquill-js-sys

If your using Leptos, you want to use the leptos wrapper mathquill-leptos.

Dependencies

~8–11MB
~196K SLoC