MathType for Joomla
Download App -- use the one for TinyMCE
Requirements
Joomla 1.5 or higher installed.
For Joomla versions prior to 3.2.x: JCE module with TinyMCE
A valid license to install the plugin in a production environment; otherwise, you may use the downloaded file for demo purposes only.
1. Copy files
Unzip the TinyMCE MathType app and copy the tiny_mce_wiris
directory into your Joomla TinyMCE plugins directory. These would be the final paths depending on your Joomla version:
小心
<JoomlaRoot>
on this page represents the absolute path to the root of your Joomla site.
Version | Path |
---|---|
3.2.x or higher: | |
1.5.14 to 3.1.6: | |
Older than 1.5.14: | |
小心
Give the web server user write permissions for the <tiny-mce-plugins-directory>/tiny_mce_wiris/cache
and <tiny-mce-plugins-directory>/tiny_mce_wiris/formulas
directories (they will be used to store formula MathML codes and temporary images).
2. Activate MathType for TinyMCE
Joomla 3.7.x or higher
To activate MathType please follow these steps:
Open the file
<JoomlaRoot>/media/editors/tinymce/skins/lightgray/skin.min.css
.Add these 2 lines to the file:
.mce-i-tiny_mce_wiris_formulaEditor:before {content:url('<JoomlaRoot>/media/editors/tinymce/plugins/tiny_mce_wiris/icons/formula.png');} .mce-i-tiny_mce_wiris_formulaEditorChemistry:before {content:url('<JoomlaRoot>/media/editors/tinymce/plugins/tiny_mce_wiris/icons/chem.png');}
Open the file
<JoomlaRoot>/plugins/editors/tinymce/tinymce.php
.Find this line:
$custom_plugin = trim($levelParams->get('custom_plugin', ));
.Replace it with this:
$custom_plugin = trim($levelParams->get('custom_plugin', 'tiny_mce_wiris'));
If there are other plugins, add a SPACE, then addtiny_mce_wiris
to the list.Look for the
getKnownButtons
element, and add these to the$buttons
variable:tiny_mce_wiris_formulaEditor' => array('label' => 'MathType', 'plugin' => 'tiny_mce_wiris'), 'tiny_mce_wiris_formulaEditorChemistry' => array('label' => 'ChemType', 'plugin' => 'tiny_mce_wiris'),
Go to the browser and access the control panel (
<JoomlaRoot>/administrator/index.php
).Go to
Extensions>Plugins
, search by TinyMCE and click it in order to change TinyMCE configuration.Into the toolbar that shows the available buttons, you will see MathType and ChemType buttons. Drag and drop to the toolbar set that you want to add.
3. Configure
Edit <JoomlaRoot>/media/editors/tinymce/jscripts/tiny_mce/plugins/tiny_mce_wiris/configuration.ini
to set your own values. This table specifies all possible parameters.
Very large formulas may not be rendered if the output_buferring option is enabled. Either disable it or set a high enough value in your server's php.ini
file.
4. WIRISplugins.js
In order to render MathType formulas outside TinyMCE editing area, Joomla needs to load the WIRISPlugin.js render file. We have additional information in the integrations page of the documentation.
小心
In Joomla you need to include WIRISplugins.js
in your template file. This file is located at /templates/<your-template-name>/index.php.
5. Clean and backup
Visit this page if you want to know how to clean the cache folder and backup your formula images.