Communicating with the MathFlow editors

Use the following Javascript methods when working with MathML:

Javascript MethodDescription
string getFormattedMathML(int markupType, int formatLevel, boolean namespaceAttr, string namespacePrefix, int characterType)Returns the MathML for the current equation with the specified format. Specific values for the parameters are as follows:

0 Mixed content/presentation markup
1 Presentation markup format
2 Content markup format (if possible)
3 Normalized presentation format (extra mrows removed)

0 Pretty printed (on multiple lines and indented to make reading easier)
1 Packed (all on one line, no indenting or extra spaces)
2 Packed and escaped (all on one line, all <>& shown as escaped characters)
3 Packed and wrapped (no extra white space, but returns added at nearest tag at 80 columns)

States whether or not a namespace prefix should be added to each tag.

Used with namespaceAttr. Prepends every tag with this namespace.

0 Special characters are shown as entity names if possible.
1 Special characters are shown in the format &#xXXXX; where X is a hexadecimal value.
2 Special characters are shown in UTF-8 format. This is the binary representation of the characters and may look strange in many text-processing programs.
void setMathML(String new_mml)Sets the MathML source for the current equation.

The SDK editor components allow you to pass an optional OptionsInfo object as a parameter to their constructor. The OptionsInfo class allows you to create, save and read options to a file. This allows the application to retain user settings.