net.fckeditor
Class FCKeditor

java.lang.Object
  extended by net.fckeditor.FCKeditor

public class FCKeditor
extends java.lang.Object

Java represantation of the FCKeditor. This class creates the html code for the FCKeditor based on the following things:

Version:
$Id: FCKeditor.java 3840 2009-07-08 20:29:46Z mosipov $

Constructor Summary
FCKeditor(javax.servlet.http.HttpServletRequest request, java.lang.String instanceName)
          Just a wrapper to FCKeditor.
FCKeditor(javax.servlet.http.HttpServletRequest request, java.lang.String instanceName, java.lang.String width, java.lang.String height, java.lang.String toolbarSet, java.lang.String value, java.lang.String basePath)
          Main constructor.
All important settings are done here and will be preset by the defaults taken from PropertiesLoader.
 
Method Summary
 java.lang.String createHtml()
          Minimum implementation, see ticket #27 for detailed information.
 FCKeditorConfig getConfig()
          Get the advanced configuration set.
By adding elements to this collection you can override the settings specified in the config.js file.
 void setBasePath(java.lang.String basePath)
          Sets the directory where the FCKeditor resides on the server.
Remarks: Avoid using relative paths.
 void setConfig(FCKeditorConfig config)
          Set the advanced configuation set.
 void setHeight(java.lang.String height)
          Set the height of the textarea
 void setInstanceName(java.lang.String instanceName)
          Set the unique name of the editor
 void setToolbarSet(java.lang.String toolbarSet)
          Set the name of the toolbar to display
 void setValue(java.lang.String value)
          Set the initial value to be edited as HTML markup.
 void setWidth(java.lang.String width)
          Set the width of the textarea
 java.lang.String toString()
          This method simply wraps to createHtml().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FCKeditor

public FCKeditor(javax.servlet.http.HttpServletRequest request,
                 java.lang.String instanceName,
                 java.lang.String width,
                 java.lang.String height,
                 java.lang.String toolbarSet,
                 java.lang.String value,
                 java.lang.String basePath)
Main constructor.
All important settings are done here and will be preset by the defaults taken from PropertiesLoader. Any parameter except instanceName failing Utils.isNotBlank(String) will be ignored.

Parameters:
request - request object
instanceName - unique name
width - width
height - height
toolbarSet - toolbarSet name
Throws:
java.lang.IllegalArgumentException - when instanceName is not valid HTML id

FCKeditor

public FCKeditor(javax.servlet.http.HttpServletRequest request,
                 java.lang.String instanceName)
Just a wrapper to FCKeditor.

Parameters:
request - request object
instanceName - unique name
Method Detail

setInstanceName

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

Parameters:
instanceName - name

setValue

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

Parameters:
value - value

setBasePath

public void setBasePath(java.lang.String basePath)
Sets the directory where the FCKeditor resides on the server.
Remarks: Avoid using relative paths. Use an absolute path from the context (e.g. /fckeditor).

Parameters:
basePath - path

setToolbarSet

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

Parameters:
toolbarSet - toolbar name

setWidth

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

Parameters:
width - width

setHeight

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

Parameters:
height - height

getConfig

public FCKeditorConfig getConfig()
Get the advanced configuration set.
By adding elements to this collection you can override the settings specified in the config.js file.

Returns:
configuration collection

setConfig

public void setConfig(FCKeditorConfig config)
Set the advanced configuation set.

Parameters:
config - configuration collection

toString

public java.lang.String toString()
This method simply wraps to createHtml().

Overrides:
toString in class java.lang.Object
See Also:
createHtml()

createHtml

public java.lang.String createHtml()
Minimum implementation, see ticket #27 for detailed information. Generate the HTML Code for the editor.
Evaluate the browser capabilities and generate the editor if compatible, or a simple textarea otherwise.

Returns:
FCKeditor html code


Copyright © 2004-2009 Frederico Caldeira Knabben. All Rights Reserved.