Editor instead of a text box

If you want to use a Word-like editor instead of a simple text box, I recommend FCKeditor with IMCE. Note that this editor depends on several DOM features, which, at the time of writing, are not present yet in Konqueror and several other browsers. In this case the editor degrades to a regular text box. In Firefox and Explorer, the editor works fine.

Download the FCKeditor module from the Drupal site and download the FCKeditor itself as well. Extract the module in sites/all/modules. The editor itself should be extracted in sites/all/modules/fckeditor. You may now enable the module.

If you get a blank page with the following error message:

Fatal error: Class 'FCKeditor' not found in fckeditor.module

edit sites/all/modules/fckeditor/fckeditor/fckeditor.php and change this line:

include_once('fckeditor_php5.php');

into:

include_once(drupal_get_path('module', 'fckeditor') . '/fckeditor/fckeditor_php5.php');

This is only needed with some hosting providers. If you use PHP4, then change the lines regarding PHP4 in a similar way.

Some notes about configuring FCKeditor:

  • It may be useful to disable FCKeditor for some pages, in particular user/* and admin/*. You can do that in the "Exclude path" setting, which is under visibility.
  • The FCKeditor module uses the theme's CSS by default, which may cause odd effects. Better use the default FCKeditor CSS.

Also note that FCKeditor needs explicit permissions for regular users to be able to use the editor. If you have added a role, make sure it is specified in one of FCKeditor's profiles. If you don't some users will see a regular textarea instead of FCKeditor.

By default Drupal filters and modifies HTML-code, which may cause layout problems in nodes created with FCKeditor. To prevent this from happening, set the default input format to Full HTML, and tell it not to use the line break filter.

If you wish to be able to insert images then download and install the IMCE module as well. Make sure that in the filebrowser settings of FCKeditor's profiles IMCE is selected in Filebrowser type. If you use Drupal 5 in combination with Explorer you need a workaround to make this work. You need to add a couple of lines in the advanced settings of FCKeditor:

LinkBrowser= true;
ImageBrowser= true;
FlashBrowser= true;
LinkBrowserURL= Drupal.settings.basePath + '?q=imce&app=FCKEditor|url@txtUrl';
ImageBrowserURL= Drupal.settings.basePath + '?q=imce&app=FCKEditor|url@txtUrl|width@txtWidth|height@txtHeight';
FlashBrowserURL= Drupal.settings.basePath + '?q=imce&app=FCKEditor|url@txtUrl';