This page documents the use of FCK Faces in your web applicatons, including the detailed instructions on configuring your application and the usage of the jsf component within you pages.
First, you need to add the FCK Faces Servlet in your web.xml. This servlet is needed to load the fckeditor resources. You must not change the servlet mapping url pattern.
<servlet> <servlet-name>FCKFaces</servlet-name> <servlet-class>org.fckfaces.util.Servlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>FCKFaces</servlet-name> <url-pattern>/fckfaces/*</url-pattern> </servlet-mapping>
If you like to provide a custom fckeditor configuration file you can define one
by the following optional context parameter.
For additional information about fckconfig files see
FCK Editor Wiki - Configuration File
.
<context-param> <param-name>org.fckfaces.CUSTOM_CONFIGURATIONS_PATH</param-name> <param-value>/js/fckconfig.js</param-value> </context-param>
After you properly configured you web application you can use the editor within your jsp or facelets pages as follows.
<fck:editor value="#{bean.text}" id="textEditor" toolbarSet="Default" width="100%" height="200"/>
But don't forget to import the taglib.
xmlns:fck="http://www.fck-faces.org/fck-faces"