Configuration setting

In the meaning of 'convention over configuration' all properties are optional. Define only those you intend to override for the entire web application.

There are two ways to override the default properties:

  • By creating a fckeditor.properties file in the classpath (usually WEB-INF/classes):
      ...
      fckeditor.toolbarSet=Silver
      connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl
      ...
  • By calling dynamically the PropertiesHolder class:
      ...
      import net.fckeditor.handlers.PropertiesLoader;
      ...
      PropertiesLoader.setProperty("fckeditor.toolbarSet", "Silver");
      PropertiesLoader.setProperty("connector.userActionImpl", 
                       "net.fckeditor.requestcycle.impl.UserActionImpl");
      ...
    Attention:
    It is essential to know how to use the PropertiesHolder. Like the common properties usage, you should use it only at the start of your web application. If you don't have a kind of an 'initialization' servlet, where you could place the PropertiesLoader calls, we suggest you to write your own ServletContextListener. So you guarantee, you call the PropertiesLoader before the ConnectorServlet is initialized.

As you can see, setting a property is equal in both ways. The tables below list all configurable properties for the integration pack.

Configuration properties

FCKeditor

PropertyDefaultValid ValuesDescription
fckeditor.toolbarSet       Defaultany string       Indicates the toolbar set you want to load. If you provide a name which does not exist, the editor will fail to load.
fckeditor.width200any stringIndicates the editor width.
fckeditor.height100%any stringIndicates the editor height.
fckeditor.basePath/fckeditor       any pathThe default path of the editor installation resides within your webapp.
Change this value only if you install the editor under a different name or maintain several editor installations.

Connector

The integration library supports file, flash, image, and media resource types. Replace type name in the property name with "file", "flash", "image", or "media".

Define either an allowed or denied list. If an allowed list is pre-defined overwrite it with an empty list and define your denied list as you wish.

PropertyDefaultValid ValuesDescription
connector.resourceType.type
name
.path
/type nameany pathIndicates the resource type path to retrieve and store files.
connector.resourceType.type
name
.extensions.denied
any extensionList with extensions which should be denied.
separate extensions with a | (pipe symbol).
connector.resourceType.file.
extensions.allowed
7z|aiff|asf|avi|bmp|csv|
doc|fla|flv|gif|gz|gzip|
jpeg|jpg|mid|mov|mp3|mp4|
mpc|mpeg|mpg|ods|odt|pdf|
png|ppt|pxd|qt|ram|rar|
rm|rmi|rmvb|rtf|sdc|sitd|
swf|sxc|sxw|tar|tgz|tif|
tiff|txt|vsd|wav|wma|wmv|
xls|xml|zip
any extensionList with extensions which should be allowed.
separate extensions with a | (pipe symbol).
connector.resourceType.flash.
extensions.allowed
swf|flaany extensionSee above.
connector.resourceType.image.
extensions.allowed
bmp|gif|jpeg|jpg|pngany extensionSee above.
connector.resourceType.media.
extensions.allowed
aiff|asf|avi|bmp|fla|flv|
gif|jpeg|jpg|mid|mov|mp3|
mp4|mpc|mpeg|mpg|png|qt|
ram|rm|rmi|rmvb|swf|tif|
tiff|wav|wma|wmv
any extensionSee above.
connector.userFilesPath/userfilesany pathIndicates the path where files are stored.
connector.forceSingleExtensiontruetrue, false (boolean)Indicates whether file names with multiple extensions are sanitzed.
connector.fullUrlfalsetrue, false (boolean)Indicates whether the server url will be prepended.
I.e. prepending http://www.yourdomain.com/
connector.secureImageUploadstruetrue, false (boolean)Checks uploaded images for validity.
I.e. the uploaded file is a real image and not any
other renamed file type.
connector.userActionImplany class implementing the
net.fckeditor.requestcycle.UserAction
interface
Provides custom security functions for the File
Browser Connector. For more details see
here.
connector.userPathBuilderImplany class implementing the
net.fckeditor.requestcycle.UserPathBuilder
interface
Provides a custom function to construct a user-dependent 'UserFilesPath' for the
File Browser Connector. For more details see
here.