Javascript method
|
Description
|
string getContentMathML()
|
Returns a string containing formatted content MathML markup for the current equation. If content markup generation fails, this will return the string "conversion error," and will visually report errors or warnings.
|
string getContentSelection()
|
Returns a string containing formatted content MathML markup for the selected portion of the current equation. If content markup generation fails, this will return the string "conversion error," and will visually report errors or warnings.
|
string getDoubleEscapedContentMathML()
|
Returns a string containing double-escaped packed content MathML markup for the current equation. If content markup generation fails, this will return the string "conversion error," and will visually report errors or warnings.
|
string getDoubleEscapedMathML()
|
Returns a string containing packed MathML markup for the current equation in which unicode characters have been double escaped, in the format of "&" + EntityName + ";".
|
string getFormattedMathML(int markupTypeint 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:
markupType
0
|
Mixed content/presentation markup
|
1
|
Presentation markup format
|
2
|
Content markup format (if possible)
|
3
|
Normalized presentation format (extra mrows removed)
|
formatLevel
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)
|
namespaceAttr
States whether or not a namespace prefix should be added to each tag.
namespacePrefix
Used with namespaceAttr. Prepends every tag with this namespace.
characterType
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.
|
|
string getFormattedMathMLSelection(int markupType, int formatLevel, boolean namespaceAttr, string namespacePrefix, int characterType)
|
Returns the MathML for the selected portion of the current equation with the selected format.
|
string getMathML()
|
Returns a string containing formatted presentation MathML markup for the current equation.
|
equation getMathMLDocument()
|
Returns the top level DOM Document node for the current equation.
|
string getPackedContentMathML()
|
Returns a string containing unformatted content MathML markup for the current equation.
|
string getPackedMathML()
|
Returns a string containing unformatted MathML markup for the current equation. The markup is stripped of extra white space including linefeeds and indenting, and is much more compact than formatted MathML.
|
string getSelection()
|
Returns a string containing formatted MathML markup for the selected portion of the current equation.
|
void insertMathMLAtCursor(string new_mml)
|
Inserts the new equation with the specified MathML markup at the current cursor location.
|
void setMathML(string new_mml)
|
Sets the MathML source for the current equation.
|
string getURLEncodedContentMathML()
|
Returns a string containing URL-encoded packed content MathML markup for the current equation. If content markup generation fails, this will return the string "conversion error," and will visually report errors or warnings.
|
string getURLEncodedMathML()
|
Returns a string containing URL-encoded packed MathML markup for the current equation in which necessary characters have been escaped in order for the string to be safely transmitted as CGI data. The following characters will be encoded:
" " -> %20
"+" -> %2B
"&" -> %26
"<" -> %3C
"=" -> %3D
">" -> %3E
"?" -> %3F
|
void setURLEncodedMathML(string mml)
|
Sets the URL-encoded MathML source for the current equation. Specifically, the following character sequences in the mml argument will be decoded:
%20 -> " "
%2B -> "+"
%26 -> "&"
%3C -> "<"
%3D -> "="
%3E -> ">"
%3F -> "?"
|