MathType for Froala 
Type and handwrite mathematical notation with MathType.
Easily include quality math equations in your documents and digital content.

Table of Contents
Installation
-
Install the npm module:
npm install @wiris/mathtype-froala
-
Load the module into your project:
<script src="node_modules/@wiris/mathtype-froala/wiris.js"></script>
-
Update Froala configuration:
-
Add MathType and ChemType buttons to the toolbar and the image menu:
${}.froalaEditor({
toolbar = ['wirisEditor', 'wirisChemistry']
toolbarButtons: ['wirisEditor', 'wirisChemistry'],
toolbarButtonsMD: ['wirisEditor', 'wirisChemistry'],
toolbarButtonsSM: ['wirisEditor', 'wirisChemistry'],
toolbarButtonsXS: ['wirisEditor', 'wirisChemistry'],
imageEditButtons: ['wirisEditor', 'wirisChemistry'],
})
-
Allow all tags, in order to allow MathML:
${}.froalaEditor({
htmlAllowedTags: ['.*'],
htmlAllowedAttrs: ['.*'],
})
-
Disable useClasses
:
${}.froalaEditor({
useClasses: false,
})
Notice that the example is assuming that you have the following directory structure:
└───index.html
└───node_modules
└───@wiris/mathtype-froala
Services
This npm module uses remotely hosted services to render MathML data. However, it is strongly recommended to install these services in your backend. This will allow you, among other things, to configure the service and to locally store the images generated by MathType.
The services are available Java, PHP, .NET and Ruby on Rails. If you use any of these technologies, please download the plugin for your backend technology from here.
In order to install the plugin along with the correspondent services, please follow the Froala install instructions.
Documentation
To find out more information about MathType, please go to the following documentation: