Wiris

Documentation / MathType

  • Demos
  • Visit our website
  • Downloads
  • Contact us
  • MathType

    • WirisQuizzes

      • Nubric

        • CalcMe

          • MathPlayer

            • Store FAQ

              • MathFlow

                • BF FAQ

                  • Miscellaneous

                    • Wiris Integrations

                      • Home
                      • MathType
                      • Technical documentation
                      • MathType for HTML editors
                      • Configuration

                      Configure WIRISplugins.js

                      Reading time: 3min

                      Configure WIRISplugins.js to render MathType formulas when displaying content outside the editor. When formulas are stored as MathML, some browsers or applications may not display them with the expected quality or accessibility features. WIRISplugins.js processes the formulas in the page and renders them according to the configured viewer options.

                      After completing this guide, MathType formulas will be rendered correctly when your content is displayed.

                      Before you begin

                      Requirements

                      Make sure you have:

                      • A MathType integration version 3.50 or later.
                      • Access to the HTML page or template where formulas are displayed.
                      • Access to the WIRISplugins.js file provided by your deployment.

                      Applies to

                      Pages that display MathType formulas outside the editor · Integrations using Full MathML mode.

                      Steps

                      Add WIRISplugins.js to the page

                      Add WIRISplugins.js to the page where MathType formulas are displayed.

                      PHP and .NET

                      For PHP and .NET integrations, use the script from the integration directory:

                      <script src="<your-plugin>/integration/WIRISplugins.js?viewer=image"></script>

                      Java

                      For Java integrations, use the script from the Integration Services application path:

                      <script src="<pluginwiris-engine-path>/app/WIRISplugins.js?viewer=image"></script>

                      Cloud deployment

                      If you're using a JavaScript-only frontend without self-hosted MathType Integration Services, you can load the viewer from the WIRIS-hosted services:

                      <script src="https://www.wiris.net/demo/plugins/app/WIRISplugins.js?viewer=image"></script>

                      Configure viewer parameters

                      You can configure WIRISplugins.js using URL parameters. For example, to render formulas as images:

                      <script src="WIRISplugins.js?viewer=image"></script>

                      To set the language used for accessible text:

                      <script src="WIRISplugins.js?viewer=image&lang=en"></script>

                      To render formulas asynchronously:

                      <script src="WIRISplugins.js?viewer=image&async=true"></script>

                      Common parameters include:

                      Parameter Purpose
                      viewer Defines how formulas are displayed.
                      lang Defines the language used for accessible text.
                      dpi Defines the image resolution used when rendering formulas.
                      async Defines whether formulas are rendered asynchronously.

                      For the complete list of parameters, supported values, and defaults, see WIRISplugins.js parameters.

                       

                      Render formulas inside a specific DOM element

                      By default, WIRISplugins.js processes the formulas in the page where it is loaded. If your application loads content dynamically, apply the viewer to a specific DOM element after the content has been inserted into the page:

                      com.wiris.js.JsPluginViewer.parseElement(
                        domElement,
                        true,
                        function() {}
                      );

                      Use this approach when formulas are added after the initial page load, for example in single-page applications or dynamically rendered content blocks.

                      Apply the configuration

                      Save the page or template where WIRISplugins.js is included. If your application bundles frontend assets, rebuild or redeploy the application if required.

                      Verify the configuration

                      Open a page that contains MathType formulas and verify that WIRISplugins.js is loaded by the browser. Use your browser's developer tools to confirm that:

                      • The script is loaded successfully.
                      • The configured URL parameters are present.
                      • No JavaScript errors are reported.

                      Verify it worked

                      Open a page that displays MathType formulas. Confirm that:

                      • Formulas are rendered correctly.
                      • Formulas include accessible text when rendered as images.
                      • Dynamically loaded formulas are rendered after calling parseElement, if applicable.

                      Options and variations

                      PHP and .NET deployments

                      Load WIRISplugins.js from your PHP or .NET Integration Services deployment.

                      Java deployments

                      Load WIRISplugins.js from your Java Integration Services deployment.

                      Cloud deployments

                      If you are using the WIRIS cloud services without self-hosted Integration Services, load WIRISplugins.js directly from the WIRIS cloud endpoint.

                      Render dynamically inserted content

                      If formulas are added to the page after it has loaded (for example, through AJAX or client-side rendering), render only the affected DOM element instead of the entire page. Use:

                      com.wiris.js.JsPluginViewer.parseElement(domElement, true, function(){});

                      Common issues

                      Formulas are not rendered

                      Verify that:

                      • WIRISplugins.js is included on the page.
                      • The script path matches your deployment.
                      • The viewer parameter is configured correctly.
                      • The page contains valid MathType formula markup.

                      Dynamically loaded formulas are not rendered

                      Verify that:

                      • parseElement is called after the content has been added to the DOM.
                      • The correct DOM element is passed to parseElement.
                      • No JavaScript errors occur before the viewer is applied.

                      The script cannot be loaded

                      Verify that:

                      • The script URL is correct for your deployment.
                      • The browser can access the script without network errors.
                      • Cross-domain requests are configured if the script is loaded from another origin.

                      Related articles

                      • Full MathML mode.
                      • WIRISplugins.js parameters.
                      • Configure rendering output.
                      • Configure cross-domain requests.
                      • Migrate MathType image formulas to MathML.

                      Was this article helpful?

                      Give feedback about this article

                      Related Articles

                      • How do I install WirisQuizzes?
                      • Integrating WirisQuizzes via LTI on other LMSs

                      Configure WIRISplugins.js

                      Before you begin Requirements Applies to Steps Add WIRISplugins.js to the page PHP and .NET Java Cloud deployment Configure viewer parameters Render formulas inside a specific DOM element Apply the configuration Verify the configuration Verify it worked Options and variations PHP and .NET deployments Java deployments Cloud deployments Render dynamically inserted content Common issues Formulas are not rendered Dynamically loaded formulas are not rendered The script cannot be loaded Related articles

                      Empowering STEM education

                      MathType

                      • Office Tools
                      • LMS
                      • XML
                      • HTML

                      WirisQuizzes

                      Nubric

                      Integrations

                      Solutions

                      • Education
                      • Publishing houses – platforms and interactive
                      • Publishing houses – Print and digital
                      • Technical writers

                      Pricing

                      Downloads

                      Blog

                      • Success stories

                      About us

                      • Careers
                      • Partnership

                      Contact Us

                      Contact Sales

                      European union (European Regional Development Fund) and 1EdTech (TrustEd Apps Certified)
                      • Cookie Policy
                      • Terms of Use
                      • Privacy Policy / GDPR
                      • Student Data Privacy
                      • Compliance
                      • Cookie Settings

                      © Wiris 2026

                      Expand