# Creating Mathematical and Chemical Formulas with MathType Documentation

The optional, commercial MathType plugin provides integration with a popular mathematical and science formula editor with classical and handwriting input modes created by our partner, Wiris. You can use it to create math equations or chemical formulas right inside the CKEditor 4 content.

When the MathType plugin is enabled, the MathType and ChemType buttons are automatically added to the toolbar. Once clicked, they open the respective dialog windows that let you write your equation and immediately see its preview.

## Using MathType

The MathType window is split into two main areas: a tabbed toolbar that contains a large number of icons that are useful for creating math equations and chemical formulas, and an editing area where you can see your current formula, the location of the cursor, and the text currently selected (if any).

Use the toolbar to write your equation or formula. At any time you can also click the "Go to handwritten mode" button on the right side of the MathType editor to switch to handwriting.

When you are done creating your scientific content, click the "OK" button to insert your formula into CKEditor 4. You can also edit any existing formulas by double-clicking them in your document.

## Get Sample Source Code

•                 CopyDownload<!doctype html>
<html lang="en">

<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
<title>Creating mathematical and chemical formulas with MathType</title>
<script src="https://cdn.ckeditor.com/4.15.1/standard-all/ckeditor.js"></script>

<body>
<textarea cols="10" id="editor1" name="editor1" rows="10" data-sample-short>&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href=&quot;https://ckeditor.com/&quot;&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
<script>
(function() {
var mathElements = [
'math',
'maction',
'maligngroup',
'malignmark',
'menclose',
'merror',
'mfenced',
'mfrac',
'mglyph',
'mi',
'mlabeledtr',
'mlongdiv',
'mmultiscripts',
'mn',
'mo',
'mover',
'mphantom',
'mroot',
'mrow',
'ms',
'mscarries',
'mscarry',
'msgroup',
'msline',
'mspace',
'msqrt',
'msrow',
'mstack',
'mstyle',
'msub',
'msup',
'msubsup',
'mtable',
'mtd',
'mtext',
'mtr',
'munder',
'munderover',
'semantics',
'annotation',
'annotation-xml'
];

CKEDITOR.replace('editor1', {
extraPlugins: 'ckeditor_wiris',
// For now, MathType is incompatible with CKEditor file upload plugins.
</html>