java.lang.Object
org.exoplatform.frameworks.jcr.web.fckeditor.FCKeditor
Direct Known Subclasses:
JCRContentFCKeditor

public class FCKeditor extends 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 Details

    • FCKeditor

      public FCKeditor(jakarta.servlet.http.HttpServletRequest req)
      Initialize the object setting all value to the default ones.
      • width: 100%
      • height: 200
      • toolbar name: Default
      • basePath: context root + "/FCKeditor/"
      Parameters:
      req - request object
    • FCKeditor

      public FCKeditor(jakarta.servlet.http.HttpServletRequest req, String parInstanceName)
      Initialize the object setting the unique name and then all value to the default ones.
      • width: 100%
      • height: 200
      • toolbar name: Default
      • basePath: context root + "/FCKeditor/"
      Parameters:
      req - request object
      parInstanceName - unique name
    • FCKeditor

      public FCKeditor(jakarta.servlet.http.HttpServletRequest req, String parInstanceName, String parWidth, String parHeight, String parToolbarSet, 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 Details

    • getInstanceName

      public String getInstanceName()
      Get the unique name of the editor
      Returns:
      name
    • setInstanceName

      public void setInstanceName(String value)
      Set the unique name of the editor
      Parameters:
      value - name
    • getValue

      public String getValue()
      Get the initial value to be edited.
      In HTML code
      Returns:
      value
    • setValue

      public void setValue(String value)
      Set the initial value to be edited.
      In HTML code
      Parameters:
      value - value
    • getBasePath

      public String getBasePath()
      Get the dir where the FCKeditor files reside on the server
      Returns:
      path
    • setBasePath

      public void setBasePath(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 String getToolbarSet()
      Get the name of the toolbar to display
      Returns:
      toolbar name
    • setToolbarSet

      public void setToolbarSet(String value)
      Set the name of the toolbar to display
      Parameters:
      value - toolbar name
    • getWidth

      public String getWidth()
      Get the width of the textarea
      Returns:
      width
    • setWidth

      public void setWidth(String value)
      Set the width of the textarea
      Parameters:
      value - width
    • getHeight

      public String getHeight()
      Get the height of the textarea
      Returns:
      height
    • setHeight

      public void setHeight(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 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
    • getUserAgent

      public String getUserAgent()
      Returns:
      the userAgent
    • setUserAgent

      public void setUserAgent(String userAgent)
      Parameters:
      userAgent - the userAgent to set