-
MathType
-
WirisQuizzes
-
Nubric
-
CalcMe
-
MathPlayer
-
Store FAQ
-
MathFlow
-
BF FAQ
-
Miscellaneous
-
Wiris Integrations
WIRISplugins.js parameters
Reading time: 1minReference for the configuration parameters supported by WIRISplugins.js.
Summary
This reference describes the URL parameters supported by WIRISplugins.js, the client-side viewer responsible for rendering MathType formulas when displaying content. These parameters are specified as query parameters in the script URL.
Configuration
| Configuration method | Location |
|---|---|
| Script URL | WIRISplugins.js?... |
Viewer parameters
| Parameter | Description | Values | Default | Notes |
|---|---|---|---|---|
viewer |
Determines how formulas are displayed. |
image, none
|
none |
image renders MathML as images. |
lang |
Language used for accessible text. | Language code, inherit
|
inherit |
When set to inherit, the language is taken from the page's <html lang> attribute. |
dpi |
Resolution used when rendering images. | Number | 96 |
Higher values improve print quality but may appear blurred on screen. |
async |
Enables asynchronous rendering. |
true, false
|
false |
Recommended for pages containing many formulas. |
Viewer API
WIRISplugins.js exposes a JavaScript API for dynamically rendering formulas.
parseElement()
Processes the MathType formulas contained in a specific DOM element. This method is typically used when content is added to the page after the initial load, such as in single-page applications or dynamically updated views.
com.wiris.js.JsPluginViewer.parseElement(
domElement,
recursive,
callback
);Parameters
| Parameter | Type | Description |
|---|---|---|
domElement |
DOM element | Root element that contains the MathType formulas to process. |
recursive |
Boolean | Whether formulas contained in child elements should also be processed. |
callback |
Function | Function called after rendering has completed. This parameter is optional. |
Example
com.wiris.js.JsPluginViewer.parseElement(
document.getElementById("content"),
true,
function () {
console.log("Rendering completed.");
}
);Notes
-
WIRISplugins.jsis only required when displaying formulas stored as MathML. - Parameters are configured through the script URL rather than the editor configuration.
- Dynamically loaded content must be processed explicitly using
parseElement().