com.fredck.FCKeditor
Class FCKeditor

java.lang.Object
  extended bycom.fredck.FCKeditor.FCKeditor

public class FCKeditor
extends java.lang.Object

The main class of the class lib.
It's the container for all properties and the class that generate the output based on browser capabilities and configurations passed by the developer.

Author:
Simone Chiaretta (simo@users.sourceforge.net)

Constructor Summary
FCKeditor(javax.servlet.http.HttpServletRequest req)
          Initialize the object setting all value to the default ones.
FCKeditor(javax.servlet.http.HttpServletRequest req, java.lang.String parInstanceName)
          Initialize the object setting the unique name and then all value to the default ones.
FCKeditor(javax.servlet.http.HttpServletRequest req, java.lang.String parInstanceName, java.lang.String parWidth, java.lang.String parHeight, java.lang.String parToolbarSet, java.lang.String parValue)
          Initialize the object setting all basic configurations.
 
Method Summary
 java.lang.String create()
          Generate the HTML Code for the editor.
 java.lang.String getBasePath()
          Get the dir where the FCKeditor files reside on the server
 FCKeditorConfigurations getConfig()
          Get the advanced configuation set.
 java.lang.String getHeight()
          Get the height of the textarea
 java.lang.String getInstanceName()
          Get the unique name of the editor
 java.lang.String getToolbarSet()
          Get the name of the toolbar to display
 java.lang.String getValue()
          Get the initial value to be edited.
 java.lang.String getWidth()
          Get the width of the textarea
 void setBasePath(java.lang.String value)
          Set the dir where the FCKeditor files reside on the server.
 void setConfig(FCKeditorConfigurations value)
          Set the advanced configuation set.
 void setHeight(java.lang.String value)
          Set the height of the textarea
 void setInstanceName(java.lang.String value)
          Set the unique name of the editor
 void setToolbarSet(java.lang.String value)
          Set the name of the toolbar to display
 void setValue(java.lang.String value)
          Set the initial value to be edited.
 void setWidth(java.lang.String value)
          Set the width of the textarea
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FCKeditor

public FCKeditor(javax.servlet.http.HttpServletRequest req)
Initialize the object setting all value to the default ones.

Parameters:
req - request object

FCKeditor

public FCKeditor(javax.servlet.http.HttpServletRequest req,
                 java.lang.String parInstanceName)
Initialize the object setting the unique name and then all value to the default ones.

Parameters:
req - request object
parInstanceName - unique name

FCKeditor

public FCKeditor(javax.servlet.http.HttpServletRequest req,
                 java.lang.String parInstanceName,
                 java.lang.String parWidth,
                 java.lang.String parHeight,
                 java.lang.String parToolbarSet,
                 java.lang.String parValue)
Initialize the object setting all basic configurations.
The basePath is context root + "/FCKeditor/"

Parameters:
req - request object
parInstanceName - unique name
parWidth - width
parHeight - height
parToolbarSet - toolbarSet name
parValue - initial value
Method Detail

getInstanceName

public java.lang.String getInstanceName()
Get the unique name of the editor

Returns:
name

setInstanceName

public void setInstanceName(java.lang.String value)
Set the unique name of the editor

Parameters:
value - name

getValue

public java.lang.String getValue()
Get the initial value to be edited.
In HTML code

Returns:
value

setValue

public void setValue(java.lang.String value)
Set the initial value to be edited.
In HTML code

Parameters:
value - value

getBasePath

public java.lang.String getBasePath()
Get the dir where the FCKeditor files reside on the server

Returns:
path

setBasePath

public void setBasePath(java.lang.String value)
Set the dir where the FCKeditor files reside on the server.
Remarks:
Avoid using relative paths. It is preferable to set the base path starting from the root (/).
Always finish the path with a slash (/).

Parameters:
value - path

getToolbarSet

public java.lang.String getToolbarSet()
Get the name of the toolbar to display

Returns:
toolbar name

setToolbarSet

public void setToolbarSet(java.lang.String value)
Set the name of the toolbar to display

Parameters:
value - toolbar name

getWidth

public java.lang.String getWidth()
Get the width of the textarea

Returns:
width

setWidth

public void setWidth(java.lang.String value)
Set the width of the textarea

Parameters:
value - width

getHeight

public java.lang.String getHeight()
Get the height of the textarea

Returns:
height

setHeight

public void setHeight(java.lang.String value)
Set the height of the textarea

Parameters:
value - height

getConfig

public FCKeditorConfigurations getConfig()
Get the advanced configuation set.
Adding element to this collection you can override the settings specified in the config.js file.

Returns:
configuration collection

setConfig

public void setConfig(FCKeditorConfigurations value)
Set the advanced configuation set.

Parameters:
value - configuration collection

create

public java.lang.String create()
Generate the HTML Code for the editor.
Evalute the browser capabilities and generate the editor if IE 5.5 or Gecko 20030210 or greater, or a simple textarea otherwise.

Returns:
html code