Skip NavigationDesign Science: How Science Communicates
Products Solutions Store Support Reference Company View Cart
 
 
TechNote #096 Last Modified: 08/03/2007

Using WebEQ in a Distributed Authoring System


The information in this document applies to:

WebEQ Developers Suite

 


Summary

This document gives some suggestions on how to use the WebEQ components to add the functionality for creating and editing equations to your distributed authoring system.

Example

To demonstrate the concepts discussed here, an example is provided showing the integration of WebEQ applets with the FCKEditor, an open source HTML text editor. This example was targeted for Internet Explorer. It does not work on Firefox, due to differences in how FCKeditor deals with selection of an applet tag.

Discussion

The WebEQ Developers Suite includes the Input Control applet, a GUI editor for creating and editing MathML. The following is a list of steps to consider when integrating the Input Control into your editing environment:

  1. Provide a method for the user to insert an equation and open the Input Control applet. In the FCKeditor example, a user can insert a new equation by pressing the toolbar button with the blue Sigma. If you hover your cursor over the button, a tool tip will appear that says "Insert Equation". If you click this button, a new page opens with the Input Control at the top and a button below it called "Insert". If you enter an equation into the Input Control and hit the "Insert" button, the equation will appear in the FCKeditor at the position the cursor was at before the "Insert Equation" button was pressed.

  2. Decide how to store and display the equation. WebEQ provides several ways to display the equation. In the FCKeditor example, an applet tag is inserted into the FCKEditor, and assigns the Viewer Control applet as the "target" for the applet tag. The Viewer Control applet renders MathML. Alternatively, you could have the MathML created by the Input Control applet sent back to your server where the WebEQ Equation Server can convert the MathML to an image. In this case a URL can be sent back to the client, which would then insert an image tag into the FCKeditor. A third option is to insert the MathML directly. For the MathML to be rendered properly, your users will be required to use a browser that supports MathML or have the MathPlayer plug-in installed.

  3. Provide a method for the user to edit an existing equation. To edit an equation in the example, you have two options.

    1) Select the equation and right click on the "selection border" that appears, and select "Update Equation".

    2) Select the equation and click on the toolbar button.

    Both of these options will open the equation into a new window that contains the Input Control applet. Since the Viewer Control is being used to display the equation, any clicks get sent to the Viewer Control, and not to the FCKeditor; therefore, double-clicking the equation does not bring up the Input Control editor. However, this would be an option should you decide to display the equation as an image.
     
Copyright © 1996-2008 Design Science. All rights reserved.   Contact us | Privacy statement