MathType for TinyMCE

Technology Demo Integration download link
PHP servers Demo site Download
ASP.NET Demo site Download
Java servlet Demo site Download
Ruby on Rails Demo site Download
  • TinyMCE 2.0 or higher installed.
  • A valid license to install the integration in a production environment; otherwise, you can use the downloaded file just for demo purposes.

Unzip the tinyMCE MathType integration and copy the tiny_mce_wiris directory into your tinyMCE plugins directory. For example, you will have tiny_mce/plugins/tiny_mce_wiris. The name of the MathType integration directory must be tiny_mce_wiris.

Technologies

Our integration is available for various technologies. Click below on the technology you are using to see full instructions you should follow.

For PHP servers

  • mbstring extension must be installed and enabled in the server.
  • Give execution rights to the web server user on the PHP files contained at to tiny_mce/plugins/tiny_mce_wiris/integration.
  • Give write permissions to tiny_mce/plugins/ tiny_mce_wiris/cache and tiny_mce/plugins/tiny_mce_wiris/formulas directories to the web server user. Those folders will be used to store formula MathML codes and temporal images. If you prefer, you can configure the location of these folders.

Configuration

Edit tiny_mce/plugins/tiny_mce_wiris/configuration.ini to set your own values.This table specifies all possible parameters.

For ASP.NET servers

  • Create an application through your IIS control panel with root directory at tiny_mce/plugins/tiny_mce_wiris. For versions older than 3.50.0 you need to create the application at /tiny_mce/plugins/tiny_mce_wiris/integration. If, given your project requirements or architecture, you need to have only one application move /tiny_mce_wiris/bin contents to the /bin directory of your project and copy the Web.config configuration to your project Web.config. If you use .NET 4.0 or above use the values of Web.config4.0.
  • Give write permissions to tiny_mce/plugins/, tiny_mce_wiris/cache and tiny_mce/plugins/tiny_mce_wiris/formulas directories to the web server user. Those folders will be used to store formula MathML codes and temporal images. If you prefer, you can configure the location of these folders.

Configuration

Edit tiny_mce/plugins/tiny_mce_wiris/configuration.ini to set your own values.This table specifies all possible parameters.

As Java servlet

  • Install the pluginwiris_engine.war in your Java web applications server. For example, tomcat.
  • Give write permissions to pluginwiris_engine/cache and to pluginwiris_engine/formulas directories to the web server user. Those folders will be used to store formula MathML codes and temporal images. If you prefer, you can configure the location of these folders .

Configuration

Edit WEB-INF/pluginwiris/configuration.ini to set your own values. This table specifies all possible parameters.

For versions older than 3.50.0 it is essential to set the value of the parameters wiriscachedirectory and wirisformuladirectory.

Ruby on Rails

  • Install wirispluginengine gem manually.
  • Specify wirispluginengine gem inside your application's Gemfile.
  • Mount Wirispluginengine engine into your application's config/routes.rb file, adding the following line: mount Wirispluginengine::Engine => 'wirispluginengine'
  • Give write permissions to wirispluginengine-X.Y.Z/cache and to wirispluginengine-X.Y.Z/formulas directories to the web server user. Those folders will be used to store formula MathML codes and temporal images. If you prefer, you can configure the location of these folders.

Configuration

Edit configuration.ini file on wirispluginengine gem root directory. This table specifies all possible parameters.

Note: This step may be specific to your platform (i.e: ILIAS).

You must activate tiny_mce_wiris on your tinyMCE integration list (see tinyMCE documentation). You can also include these buttons on your tinyMCE button list:

tiny_mce_wiris_formulaEditor
tiny_mce_wiris_formulaEditorChemistry

Add WIRISplugin.js script. Follow this instructions.

In order to check if the integration is installed correctly, there is a page that makes some tests on your server. Open this link to see where is your test page.

The parameters used when creating formulas (font color, background color, transparency...) are defined in the configuration.ini file. However, it is possible, in specific cases, that these values must be overriden ​​at runtime or that there must be two editors with different configurations running at once.

To solve the problem, it offers the possibility to specify settings for the integration in the TinyMCE initialization.

The following snippet of Javascript code shows the available parameters and how to set their values​​:

tinyMCE.init({
    ...
 
    wirisimagebgcolor: '#FFFFFF',
    wirisimagesymbolcolor: '#000000',
    wiristransparency: 'true',
    wirisimagefontsize: '16',
    wirisimagenumbercolor: '#000000',
    wirisimageidentcolor: '#000000',
    wirisformulaeditorlang: 'es'
});

Visit this page if you want to know how to clean the cache folder and backup your formula images.

Some rich text editors, such as CKEditor or TinyMCE, allow you to specify a URL based location of plugins outside of the normal plugins directory.

This option is useful when loading the rich text editor from a CDN or when you want to have the editor directory separate from your custom integrations. In case you are using a programing language for which MathType Integrations are not available this is also a good option.

You can install MathType integration as an external integration and TinyMCE. Using this option you do not need to install any component on your servers. You only need to add the following line to your TinyMCE configuration.

external_plugins: { tiny_mce_wiris: 'https://www.wiris.net/demo/plugins/tiny_mce/plugin.js' }

To Include MathType buttons in your TinyMCE button list, the button keys are the following:

tiny_mce_wiris_formulaEditor
tiny_mce_wiris_formulaEditorChemistry