withinweb

Information and support for products of withinweb.com

withinweb header image 2

Configuring the fckeditor HTML editor

August 22nd, 2010 · No Comments

The fckeditor is described on the web site http://www.fckeditor.net and is a configurable html text editor with many add ons and plugins.

The configuration file in the fckconfig.js file is set to use the english language ‘en’ with a toolbar set called ‘pg_toolbar’. The FCKEditor web site provides full desciption on its options and configuration.

The fckeditor has the ability to upload images and files with a file manager system. This is disabled by default.

To set up the upload facility in fckeditor.

(A)

In the file \fckeditor\editor\filemanager\browser\default\connectors\php\config.php

change ‘false’ to ‘true’ to allow uploads.

The relevant line in config.php file :
// SECURITY: You must explicitly enable this “connector”. (Set it to “true”).
$Config['Enabled'] = false ;

(B)

Create a folder on the server where you want the files to be located and identify
the folder in \fckeditor\editor\filemanager\browser\default\connectors\php\config.php

Then change the permissions on that folder to 777.

The relevant line in config.php file :
// Path to user files relative to the document root.
$Config['UserFilesPath'] = ‘/UserFiles/’;

the document root being the root of the web server.

Another area of customisation that you may want to implement is defining the toolbar that appears above the text box which is used to enter product descriptions. The toolbar has been trimmed to make it more manageable and to remove tools that are not required all that often. However, you may want to add back in some buttons which is very easy to do.

Open up the file /fckeditor/fckeditor.js with a suitable text editor.

The toolbar that we use is called FCKConfig.ToolbarSets["pg_toolbar"].

The default toolbar is FCKConfig.ToolbarSets["Default"].

If you want to add a button from the default toolbar, just copy it and place it into FCKConfig.ToolbarSets["pg_toolbar"].

Or if you want all the buttons, rename FCKConfig.ToolbarSets["Default"] to FCKConfig.ToolbarSets["pg_toolbar"] and remove the old FCKConfig.ToolbarSets["pg_toolbar"].

Note that the very last button on the toolbar is used to maximise the editor window which can help if you are doing more detailed work with the html.

Tags: PHP-eSeller · PHP-SecureArea

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.