The issue I have is that I’m converting an application that used to be written in flash and needs to work a certain way. You can get an idea by going to http://www.interactmath.com, click enter, choose the Adams: Calculus, 6e book. Then go to Chapter 0, Section 1 and chose the first exercise. You should see my flash based equation editor. You can click on it and start play with it. It does a lot of stuff. It has shortcuts, syntax highlighting for functions and other stuff. Though this example doesn’t show it, it handles matrices and other constructs as well. We also have a read-only version of this that supports accessibility using MathSpeak. I’m just scratching the surface though with describing all that it can do.
So I needed to make a decision, do I start with MathQuill which is probably 10-15% there, and then possibly struggle to force fit my needs into MathQuill, or do I just build it from the ground up knowing all the features I would need. If you read the MathQUill wiki, you’ll see that even the people that wrote MathQuill concede that it needs to be reworked for the future. Anyway, I decided to just use MathQuill as an inspiration and code it from the ground up maintaining my original architecture, but tweaking it to build html dom objects with CSS as opposed to Flash display objects. This made it easier to maintain similar functionality. Also, I’m using dojo and not jquery to write it since the rest of my app is using dojo.
That being said, all was going well until yesterday. I had my basic version working on desktops and the ipad with safari. However, I’m having a lot of trouble on android. It all centers around the hidden textarea control you need to use to proxy the keyboard events. I plan on verifying all this today, but from what I can tell so far, the android browsers do not have a keypress event. Also, in the built-in android browser for ICS, it seems that if you have the keyboard open and you’re typing it will not allow you to update the html dom. It lets you do it, but you don’t see the results until either you do a lot of changes or you leave focus. This is a huge problem since the entire design depends on updating the html dom. Today, I plan on making some test pages that use some simple pure javascript to demonstrate some of these issues so I can get a handle on how to deal with them. I’m very worried right now about my approach because of this dom update issue. I’m toying with the idea to have a mode that causes my editor to create a canvas or svg instead of html. Maybe those will update while the user is typing. That’s a lot of work though so I’m going to try and deal with the issues using the dom if possible.
BTW, if you try the MathQuill demo (with the latest js from github or the demo on the site), it has various troubles as well.
Another idea I’m toying around with is it use a “fake” virtual keyboard instead of the real keyboard of the device. I don’t really like that idea though.
Good luck.
--