The goog.ui.equation.ImageRenderer Namespace

.BACKGROUND_COLOR {string}

The default background color as used in the img url, which is fully transparent white.

.EE_IMG_ATTR {string}

Non-standard to put on our equations IMG elements. Useful when classes need to be scrubbed from the user-generated HTML, but non-standard attributes can be white-listed.

.EE_IMG_CLASS {string}

Class to put on our equations IMG elements.

.EE_IMG_VERTICAL_ALIGN {string}

Vertical alignment for the equations IMG elements.

.FOREGROUND_COLOR {string}

The default foreground color as used in the img url, which is black.

.MAX_EQUATION_LENGTH {number}

The longest equation which may be displayed, in characters.

.NO_RESIZE_IMG_CLASS {string}

Class to put on IMG elements to keep the resize property bubble from appearing. This is different from PLACEHOLDER_IMG_CLASS because it's reasonable in some cases to be able to resize a placeholder (which should be reflected when the placeholder is replaced with the other content).

.getEquationFromImage(equationNode)

Gets the equation string from the given equation IMG node. Returns empty string if the src attribute of the is not a valid equation url.

equationNode {Element}
The equation IMG element.
returns {string}
The equation string.

.getEquationFromImageUrl(imageUrl)

Returns the equation string src for given image url.

imageUrl {string}
The image url.
returns {string?}
The equation string, null if imageUrl cannot be parsed.

.getHtml(equation)

Returns the html for the html image tag for the given equation.

equation {string}
The equation.
returns {string}
The html code to embed in the document.

.getImageUrl(equation)

Returns the equation image src url given the equation.

equation {string}
The equation.
returns {string}
The equation image src url (empty string in case the equation was empty).

.isEquationElement(node)

Checks whether given node is an equation element.

node {Node}
The node to check.
returns {boolean}
Whether given node is an equation element.

.isEquationTooLong(equation)

Checks whether equation is too long to be displayed.

equation {string}
The equation to test.
returns {boolean}
Whether the equation is too long.