math-input. The contents and development activity have moved into the Perseus repo here.
Khan Academy's new expression editor for the mobile web. Used in the Perseus exercise framework to power math input and expression editing on small screens.
Try it yourself on Khan Academy. (Note: you'll need to enable mobile emulation, if you're accessing the site from a desktop browser.)
- Clone the project:
git clone firstname.lastname@example.org:Khan/math-input.git
- Install dependencies:
- Start the development server:
When you start the project you'll need to be on a device that supports touch or touch emulation to see the keyboard. The easiest way to get started is open the developer tools on Google Chrome.
- Multiple keypad configurations, so as to accommodate a range of input types (i.e., fractions/mixed numbers, algebraic expressions).
- Multi-page keypads, with swipeable page navigation.
- Touch-and-drag interactions (as supported by the stock iOS and Android keypads).
- A draggable cursor with a detached handle, for fine-grained control on touch devices.
- Custom state transitions for the editing experience, to streamline expression entry.
Note that, as the input and keypad only respond to touch events, you'll need to enable mobile emulation (e.g., as supported by Chrome) in order to use the keypad in a desktop browser.
To run the demo locally, clone the repo,
yarn watch, and open the
index.html page. The local behaviors can similarly be customized via the editor @