Class FCKeditor
java.lang.Object
org.exoplatform.frameworks.jcr.web.fckeditor.FCKeditor
- Direct Known Subclasses:
JCRContentFCKeditor
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.
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
ConstructorsConstructorDescriptionFCKeditor(javax.servlet.http.HttpServletRequest req) Initialize the object setting all value to the default ones.Initialize the object setting the unique name and then all value to the default ones.FCKeditor(javax.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/" -
Method Summary
Modifier and TypeMethodDescriptioncreate()Generate the HTML Code for the editor.Get the dir where the FCKeditor files reside on the serverGet the advanced configuation set.
Adding element to this collection you can override the settings specified in the config.js file.Get the height of the textareaGet the unique name of the editorGet the name of the toolbar to displaygetValue()Get the initial value to be edited.
In HTML codegetWidth()Get the width of the textareavoidsetBasePath(String value) Set the dir where the FCKeditor files reside on the server.
Remarks:
Avoid using relative paths.voidsetConfig(FCKeditorConfigurations value) Set the advanced configuation set.voidSet the height of the textareavoidsetInstanceName(String value) Set the unique name of the editorvoidsetToolbarSet(String value) Set the name of the toolbar to displayvoidsetUserAgent(String userAgent) voidSet the initial value to be edited.
In HTML codevoidSet the width of the textarea
-
Constructor Details
-
FCKeditor
public FCKeditor(javax.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
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 objectparInstanceName- unique name
-
FCKeditor
public FCKeditor(javax.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 objectparInstanceName- unique nameparWidth- widthparHeight- heightparToolbarSet- toolbarSet nameparValue- initial value
-
-
Method Details
-
getInstanceName
Get the unique name of the editor- Returns:
- name
-
setInstanceName
Set the unique name of the editor- Parameters:
value- name
-
getValue
Get the initial value to be edited.
In HTML code- Returns:
- value
-
setValue
Set the initial value to be edited.
In HTML code- Parameters:
value- value
-
getBasePath
Get the dir where the FCKeditor files reside on the server- Returns:
- path
-
setBasePath
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
Get the name of the toolbar to display- Returns:
- toolbar name
-
setToolbarSet
Set the name of the toolbar to display- Parameters:
value- toolbar name
-
getWidth
Get the width of the textarea- Returns:
- width
-
setWidth
Set the width of the textarea- Parameters:
value- width
-
getHeight
Get the height of the textarea- Returns:
- height
-
setHeight
Set the height of the textarea- Parameters:
value- height
-
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
Set the advanced configuation set.- Parameters:
value- configuration collection
-
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
- Returns:
- the userAgent
-
setUserAgent
- Parameters:
userAgent- the userAgent to set
-