Class FCKEditor

java.lang.Object
org.exoplatform.webui.form.wysiwyg.FCKEditor

public class FCKEditor extends Object
FCKeditor control class.
It creates the html code for the FCKeditor based on the following things:
  • browser's capabilities
  • different properties settings managed by the PropertiesLoader
  • settings from the 'caller', eg. jsp-pages
Version:
$Id: FCKeditor.java 1682 2008-03-05 17:27:06Z th-schwarz $
  • Constructor Details

    • FCKEditor

      public FCKEditor(jakarta.servlet.http.HttpServletRequest request, String instanceName, String width, String height, String toolbarSet, String value, String basePath)
      Main constructor.
      All important settings are done here and will be preset by there defaults taken from PropertiesLoader.
      Parameters:
      request - request object
      instanceName - unique name
      width - width
      height - height
      toolbarSet - toolbarSet name
    • FCKEditor

      public FCKEditor(jakarta.servlet.http.HttpServletRequest request, String instanceName)
      Just a wrapper to FCKEditor.
      Parameters:
      request - request object
      instanceName - unique name
  • Method Details

    • setInstanceName

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

      public void setValue(String value)
      Set the initial value to be edited.
      In HTML code
      Parameters:
      value - value
    • 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
    • setToolbarSet

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

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

      public void setHeight(String value)
      Set the height of the textarea
      Parameters:
      value - height
    • getConfig

      public FCKEditorConfig 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(FCKEditorConfig value)
      Set the advanced configuation set.
      Parameters:
      value - configuration collection
    • create

      public String create()
      Minimum implementation, see ticket #27 for detailed information.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • createHtml

      public String createHtml()
      Generate the HTML Code for the editor.
      Evalute the browser capabilities and generate the editor if compatible, or a simple textarea otherwise.
      Returns:
      html code
    • check

      public boolean check(String userAgentString)