WIRIS plugin for FCKeditor

 

 

 

 

DOWNLOAD

 

1 Requirements

  • FCKeditor 2.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 FCKeditor WIRIS Plugin and copy the fckeditor_wiris directory into your FCKeditor plugins directory. For example, you will have fckeditor/editor/plugins/fckeditor_wiris . The name of the WIRIS plugin directory must be fckeditor_wiris .

2.1 For PHP servers

  1. Give execution rights to the web server user on the PHP files contained at to fckeditor/editor/plugins/fckeditor_wiris/integration.
  2. Give write permissions to fckeditor/editor/plugins/fckeditor_wiris/cache and to fckeditor/editor/plugins/fckeditor_wiris/formulas directories to the web server user.Those folders will be used to store formula MathML codes and temporal images.

2.2 For ASP.NET servers

  1. Create an application through your IIS control panel with root directory at to fckeditor/editor/plugins/fckeditor_wiris/integration .
  2. Give write permissions to fckeditor/editor/plugins/fckeditor_wiris/cache and to fckeditor/editor/plugins/fckeditor_wiris/formulas directories to the web server user. Those folders will be used to store formula MathML codes and temporal images.

2.3 For ASP servers

  1. Give write permissions to fckeditor/editor/plugins/fckeditor_wiris/cache and to fckeditor/editor/plugins/fckeditor_wiris/formulas directories to the web server user. Those folders will be used to store formula MathML codes and temporal images.

2.4 As Java servlet

  1. Install pluginwiris_engine.war in your Java web applications server. For example, tomcat.
  2. By default, the javascript code loads the pluginwiris_engine from the root of web application server (/pluginwiris_engine/app). However, if you want to store the pluginwiris_engine in another path, you should edit these javascript codes.
    1. Open fckeditor/editor/plugins/fckeditor_wiris/fckplugin.js.
    2. Change the variables _wrs_conf_editorPath, _wrs_conf_CASPath, _wrs_conf_createimagePath and _wrs_conf_createcasimagePath with your preferred values.
    3. Save changes.

3 Configure

3.1 On PHP, ASP.NET and ASP integrations

Edit fckeditor/editor/plugins/fckeditor_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.

It is essential to establish the value of the parameters wiriscachedirectory and wirisformuladirectory.

4 Include WIRIS plugin for FCKeditor on your own platform

You must include fckeditor_wiris on your FCKeditor plugin list. This list is specified at fckeditor/fckconfig.js (see FCKeditor documentation).

4.1 Adding the plugin to the plugin list

Search the line:

FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;

Then, add after this line the code below:

FCKConfig.Plugins.Add('fckeditor_wiris');

The result should look like this:

FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
FCKConfig.Plugins.Add('fckeditor_wiris');

4.2 Adding WIRIS buttons on FCKeditor toolbar

Search the line:

FCKConfig.ToolbarSets["Default"] = [

There is the toolbar configuration. You should add fckeditor_wiris_openFormulaEditor and fckeditor_wiris_openCAS buttons where you want.

5 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.

6 Custom WIRIS properties

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 plugin in the FCKeditor initialization.

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

var editorWithBlackBackground = new FCKeditor('blackBackground');

// WIRIS properties
editorExample.Config['wirisimagebgcolor'] = '#FFFFFF';
editorExample.Config['wirisimagesymbolcolor'] = '#000000';
editorExample.Config['wiristransparency'] = 'true';
editorExample.Config['wirisimagefontsize'] = '16';
editorExample.Config['wirisimagenumbercolor'] = '#000000';
editorExample.Config['wirisimageidentcolor'] = '#000000';
editorExample.Config['wirisformulaeditorlang'] = 'es';

7 Clean and backup your WIRIS plugin for FCKeditor

Check this page.