Try MathTypeX right now – no sign-up needed.Open the editor →

Home › For websites

Add the editor to your website

For teachers, bloggers and developers who want an equation editor on their own page.

MathTypeX goes on any page with one script. The short version:

  1. Put a container on your page

    An empty element where the editor will appear.

  2. Load the script

    The editor.js file from your copy of MathTypeX.

  3. Create the editor

    Choose the language 'en' or 'ar'.

<div id="editorContainer"></div>
<script src="editor.js"></script>
<script>
  const editor = MathTypeX.JsEditor.newInstance({ language: 'en' });
  editor.insertInto(document.getElementById('editorContainer'));
  editor.on('change', (e) => console.log(e.mathml));   // the formula as MathML
</script>

Read the formula with getMathML(), get an image with getPNG(), and set a formula with setMathML().

The editor runs entirely in the visitor's browser with no server, so plain static hosting is enough.

Full details on GitHub

Ready to write your first equation?

Open the full-page editor. It is the same editor you just tried, with the whole window to work in.

The MathTypeX equation editor showing the quadratic formula