The editor API makes the editor easy to brand, embed, and integrate with other elements of a solution. It is organized around the well-known MVC (model-view-controller) pattern. The main entities in the API are:
micd.Editor
Editor instances act as the controller in the MVC pattern. An editor can convert its content to other formats, manage features such as the caret position, selection, and undo history, and explicitly get or set the editor contents using the editor's native .micd
file format.
Editors also encapsulate the underlying model of the MVC pattern, the math document. To keep the model in a consistent state, it cannot be accessed directly. Instead, the model is typically mutated by applying commands through the editor. There are hundreds of available commands.
micd.Walker
Fine-grained access to the underlying math document is possible by attaching a Walker to the editor. With a Walker, you can traverse documents, examine document Nodes, insert and remove content, and perform complex transformations and conversions.
micd.View
Views provide a minimal interface for users to interact with an editor. Visually they are similar to a text field, such as a <textarea>
on <input>
element.
micd.shell.Shell
A shell embeds a View within a set of rich controls, making it easy to access common math objects. The API provides a standard shell implementation which is accessed through this interface. These standard shells are created asynchronously by calling micd.shell.create. This ensures that the shell code and resources are only loaded if needed. The standard shell is customizable: it can be styled (see ThemeOptions), and the interface controls can be customized. For specialized uses cases, fully custom solutions can also be built on top of Views. We can also work with you to implement a custom shell for your exact needs.
This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.