com.fredck.FCKeditor.tags
Class FCKeditorTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bycom.fredck.FCKeditor.tags.FCKeditorTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class FCKeditorTag
extends javax.servlet.jsp.tagext.BodyTagSupport

Custom Tag class to access the contaniner.

Simple usage:

	<FCK:editor
		id="EditorAccessibility"
		width="80%"
		height="120"
		toolbarSet="Accessibility"
	">This is another test. <BR"><B">The "Second" row.</B"></FCK:editor">
 

In this example we set all the attribute for the fckedit tag.

Advanced usage of the tag:

	<FCK:editor id="EditorDefault" basePath="/FCKeditor/">
		<FCK:config name="StyleNames" value=";Style 1;Style 2; Style 3" />
		<FCK:config name="FontNames" value=";Arial;Courier New;Times New Roman;Verdana" />
		This is some <B>sample text</B>.
	</FCK:editor>
  

In this example we set the id and the basePath of the editor (since it is /FCKeditor/ we could have omitted it because it's already the default value).
Then we used the inner tag <FCK:config> to set some advanced configuration settings.

Author:
Simone Chiaretta (simone@piyosailing.com)
See Also:
Serialized Form

Field Summary
protected  FCKeditor fcked
          The underlying FCKeditor object
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
FCKeditorTag()
           
 
Method Summary
 int doAfterBody()
          Retrive initial value to be edited and writes the HTML code in the page
 int doStartTag()
          Initialize the FCKeditor container and set attributes
 java.lang.String getBasePath()
          Get the dir where the FCKeditor files reside on the server
 java.lang.String getCanBrowse()
          Get the capability to browse files or images from inside the editor
 java.lang.String getCanUpload()
          Get the capability to upload files or images from inside the editor
 java.lang.String getHeight()
          Get the height of the textarea
 java.lang.String getId()
          Get the unique id of the editor
 java.lang.String getToolbarSet()
          Get the name of the toolbar to display
 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 setCanBrowse(java.lang.String value)
          Set the capability to browse files or images from inside the editor
 void setCanUpload(java.lang.String value)
          Set the capability to upload files or images from inside the editor
 void setHeight(java.lang.String value)
          Set the height of the textarea
 void setId(java.lang.String value)
          Set the unique id of the editor
 void setToolbarSet(java.lang.String value)
          Set the name of the toolbar to display
 void setWidth(java.lang.String value)
          Set the width of the textarea
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doEndTag, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

fcked

protected FCKeditor fcked
The underlying FCKeditor object

Constructor Detail

FCKeditorTag

public FCKeditorTag()
Method Detail

getId

public java.lang.String getId()
Get the unique id of the editor

Returns:
id

setId

public void setId(java.lang.String value)
Set the unique id of the editor

Parameters:
value - name

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

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

getCanUpload

public java.lang.String getCanUpload()
Get the capability to upload files or images from inside the editor

Returns:
true/false

setCanUpload

public void setCanUpload(java.lang.String value)
Set the capability to upload files or images from inside the editor

Parameters:
value - true/false

getCanBrowse

public java.lang.String getCanBrowse()
Get the capability to browse files or images from inside the editor

Returns:
true/false

setCanBrowse

public void setCanBrowse(java.lang.String value)
Set the capability to browse files or images from inside the editor

Parameters:
value - true/false

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Initialize the FCKeditor container and set attributes

Returns:
EVAL_BODY_BUFFERED
Throws:
javax.servlet.jsp.JspException - if canUpload or canBrowse are not of boolean value

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Retrive initial value to be edited and writes the HTML code in the page

Returns:
SKIP_BODY
Throws:
javax.servlet.jsp.JspException - if an error occurs whie writing to the out buffer