Fix jQuery dependency to be 1.5.2+

Use .bind()/.unbind() instead of .on()/.off(), which were added in
jQuery 1.7:
https://blog.jquery.com/2011/11/03/jquery-1-7-released/

And in our tests, use jQuery.extend() instead of the second argument to
jQuery.Event() where you can pass in an object and its properties are
set on the newly created Event object, which was added in jQuery 1.6:
http://api.jquery.com/category/events/event-object/

And in our docs, bump our minimum required jQuery version from 1.4.3+
to 1.5.2+, because we need some kind of focus/blur-related jQuery bugfix
added in 1.5.2 [0]. I've added a test case that fails with jQuery 1.5.1
but passes with jQuery 1.5.2 and onwards (hopefully; tested with 1.7.2,
which was what our tests had been using, and 1.12.4, the latest 1.x).

[0]: Best guess: https://bugs.jquery.com/ticket/7340
     Other possibilities:
       https://blog.jquery.com/2011/03/31/jquery-152-released/

Finally, downgrade the version of jQuery we test with from 1.7.2 to
1.5.2, so we won't accidentally use new features like .on() again.

I guess we've come a long way since #35 when we first documented the
1.4.3+ requirement.
12 files changed
tree: 743bbfbcbe203d443ac8257e5f7fc7c2a4125914
  1. docs/
  2. script/
  3. src/
  4. test/
  5. .gitattributes
  6. .gitignore
  7. BUILDING
  8. CHANGELOG.md
  9. circle.yml
  10. Makefile
  11. mkdocs.yml
  12. package.json
  13. README.md
README.md

MathQuill

by Han, Jeanine, and Mary (maintainers@mathquill.com)

MathQuill is a web formula editor designed to make typing math easy and beautiful.

The MathQuill project is supported by its partners. We hold ourselves to a compassionate Code of Conduct.

MathQuill is resuming active development and we‘re committed to getting things running smoothly. Find a dusty corner? Let us know in Slack. (Prefer IRC? We’re #mathquill on Freenode.)

Getting Started

MathQuill has a simple interface. This brief example creates a MathQuill element and renders, then reads a given input:

var htmlElement = document.getElementById('some_id');
var config = {
  handlers: { edit: function(){ ... } },
  restrictMismatchedBrackets: true
};
var mathField = MQ.MathField(htmlElement, config);

mathField.latex('2^{\\frac{3}{2}}'); // Renders the given LaTeX in the MathQuill field
mathField.latex(); // => '2^{\\frac{3}{2}}'

Check out our Getting Started Guide for setup instructions and basic MathQuill usage.

Docs

Most documentation for MathQuill is located on ReadTheDocs.

Some older documentation still exists on the Wiki.

Open-Source License

The Source Code Form of MathQuill is subject to the terms of the Mozilla Public License, v. 2.0: http://mozilla.org/MPL/2.0/

The quick-and-dirty is you can do whatever if modifications to MathQuill are in public GitHub forks. (Other ways to publicize modifications are also fine, as are private use modifications. See also: MPL 2.0 FAQ)