mathquill/mathquill — pull request #238 by laughinghan (2014-02-07 19:43:09+00:00)
Title: Kill jQuery plugin; global MathQuill() returns API obj #big

## Usage

To create a MathQuill thing, just call `MathQuill.StaticMath()`,
`.MathField()` or `.TextField()` with an HTML element:
```html

```
```js
var mathField = MathQuill.MathField($('#math-field')[0]);
assert(mathField instanceof MathQuill.MathField);
assert(mathField instanceof MathQuill.EditableField);
assert(mathField instanceof MathQuill);
```
All of the old `.mathquill('methodName', ...)` methods are available on
this MathQuill object as `.methodName(...)` methods, plus a new `.el()`
method that returns the HTML element:
```js
mathField.latex('x^2 + y^2 = 1');
$(mathField.el()).detach().appendTo(somewhereElse);
mathField.redraw();
```
The `MathQuill` global API object is also a function that you can use to
get the API object for an HTML element:
```js
MathQuill($('#math-field')[0]).latex('y = \\pm \\sqrt{ 1 - x^2 }');
assert(MathQuill($('#math-field')[0]) === mathField);
```
---

For now I kept all the old, tired `mathquill-embedded-latex`,
`mathquill-editable`, `mathquill-textbox` CSS class names, but it'd be
nice to use more sensical `mathquill-static-math`,
`mathquill-math-field`, `mathquill-text-field` names instead.