Published using Google Docs
Updated automatically every 5 minutes

PlanetJ has designed a new add-on feature for the Web Object Wizard (WOW), the ability to use a WYSIWYG editor to create HTML fields within your database files. There are many uses for this new feature, including the ability to create webpages by utilizing a field in your database (this feature must be extended with some custom JSP's). Others may wish to use this as a very large and fully editable comments section within their database, including the ability to insert breaks, horizontal rules and pictures. The WYSIWYG editor also functions very similar to a word processing program, with the ability to italicize, bold, strikethrough, underline, highlight, and most other options that are found in word processing programs today.


Creating a WYSIWYG Field


If you do not have the 'HTML WYSIWYG' option in Display Components (in your Field Descriptor [FD] manager), you must run an SQL statement against your PJSYSxx (where 'xx' is the version number of your PJSYS library, for this example we'll use '64') library to insert the necessary information. The SQL statement is as follows:

insert into PJSYS64.depvdta values ('', '', '', '', 0, '*DISPLAY_COMPONENT*',
'15', 'HTML WYSIWYG', 1, -1000, 0);

NOTE: The '' are single quotes, denoting an empty string. In some databases you may be able to replace these with null, if the fields in your library allow for null values, if not the empty string is required.


This should allow you to select “HTML WYSIWYG” from the Display Components drop-down in your Field Descriptor manager.


Next, unzip the file and put it in your webapp (i.e. C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\wow65). It should place a folder called “wysiwyg” inside your “wow” folder in the webapp.

Creating a WYSIWYG Field

The first step to setting up your WYSIWYG field is to be sure there is a field is large enough to support the number of characters that may be required when creating a HTML page. If your field is not large enough, create a new one large enough to support your needs.


The second step is to access the Field Descriptor of the field you wish to use. To access the Field Descriptor Manager, click on the gear icon that is located next to the field name on the result table, or go to your Connections and to the right of the connection there should be a hyperlink to "Edit FDs" which will bring up the Field Descriptor Manager for that connection. Within the Field Descriptor Manager there is a setting  called “Display Component.”

In the Display Components drop-down menu there should be a “HTML WYSIWYG” option that you can select. This will make the field a WYSIWYG editor when you insert, edit or copy the row.