In MathQuill, the field in which you type is implemented with JS. Even the cursor is just a span that blinks.
span
Why does Mathquill do this instead of building on top of contenteditable?
contenteditable