×

Discover

Installation instructions: WIRIS plugin for CKEditor

DOWNLOAD

1 Requirements

  • CKEditor 3.0 or higher installed.
  • A valid license to install the plugin in a production environment; otherwise, you can use the downloaded file just for demo purposes.

2 Copy files

Unzip the CKEditor WIRIS Plugin and copy the ckeditor_wiris directory into your CKEditor plugins directory. For example, you will have ckeditor/plugins/ckeditor_wiris . The name of the WIRIS plugin directory must be ckeditor_wiris.

2.1 For PHP servers

  1. mbstring extension must be installed and enabled in the server.
  2. Give execution rights to the web server user on the PHP files contained at to ckeditor/plugins/ckeditor_wiris/integration.
  3. Give write permissions to ckeditor/plugins/ckeditor_wiris/cache and to ckeditor/plugins/ckeditor_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 (see section 3).

2.2 For ASP.NET servers

  1. Create an application through your IIS control panel with root directory at ckeditor/plugins/ckeditor_wiris. For versions older than 3.50.0 you need to create the application at /ckeditor/plugins/ckeditor_wiris/integration. If, given your project requirements or architecture, you need to have only one application move /ckeditor_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.
  2. Give write permissions to ckeditor/plugins/ckeditor_wiris/cache and to ckeditor/plugins/ckeditor_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 (see section 3).

2.3 For ASP servers

  1. Give write permissions to ckeditor/plugins/ckeditor_wiris/cache and to ckeditor/plugins/ckeditor_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 (see section 3).

2.4 As Java servlet

  1. Install the pluginwiris_engine.war in your Java web applications server. For example, tomcat.
  2. 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 (see section 3).

2.5 For Ruby on Rails

  1. Install wirispluginengine gem manually
  2. Specify wirispluginengine gem inside your application's Gemfile.
  3. Mount Wirispluginengine engine into your application's config/routes.rb file, adding the following line: mount Wirispluginengine::Engine => 'wirispluginengine'
  4. 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 (see section 3).

3 Configure

3.1 On PHP, ASP.NET and ASP integrations

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

3.2 On Java integration

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.

3.3 On Ruby on Rails (RoR)

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

4 Include WIRIS plugin for CKEditor on your own platform

You must include some content on your CKEditor configuration file ckeditor/config.js (see CKEditor documentation).

4.1 For CKEditor 3

The result should be like this:

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
    // Add WIRIS to the plugin list
    config.extraPlugins += (config.extraPlugins.length == 0 ? '' : ',') + 'ckeditor_wiris';

    // Add WIRIS buttons to the "Full toolbar"
    // Optionally, you can remove the following line and follow
    // http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar
    config.toolbar_Full.push({ name: 'wiris', 
    items : [ 'ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry', 'ckeditor_wiris_CAS' ]});
};

Note: if you have a configured custom toolbar, you must add ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry', 'ckeditor_wiris_CAS'] buttons where you want (see http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar).

4.2 For CKEditor 4

The result should be like this:

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config )
{
    // Add WIRIS to the plugin list
    config.extraPlugins += (config.extraPlugins.length == 0 ? '' : ',') + 'ckeditor_wiris';
};

If you use the Full MathML mode and for CKeditor versions higher than 4.0 you have to add this line as well:

config.allowedContent = true;

Note: if you have a configured custom toolbar, you must add 'ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry' and 'ckeditor_wiris_CAS' buttons where you want.

5 WIRISpugins.js

Add WIRISplugin.js script. You can find more information here.

6 Check that the plugin works correctly

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

7 Clean and backup your WIRIS plugin for CKEditor

Check this page.