Drupal 5 - Disable FCKEditor per content type

Submitted by Janak on Wed, 11/11/2009 - 13:00

Anyone using the Drupal module for FCKEditor can tell you the number of times its made their life easier. Install and configure it and you have yourself an instant (and FREE) WYSIWYG HTML Editor.

I mentioned in my previous posts, I am currently working on making Drupal Forums look and function like PHPBB. Having installed the superb Smileys Module by Gurpartap Singh I noticed FCKEditor was breaking the Smilie insertion on the nodepages.

To solve the problem, I wanted my Drupal 5 "Forum" content type to not display FCKEditor formatter. It seems Drupal 6 version of FCKEditor already has restrict by content type setting but Drupal 5 version no such feature. A quick chat with my friend and colleage Nick Thompson and stumbling upon this tip in drupal forums

I ended up doing a hook_form_alter like this:

function mymodule_form_alter($form_id, &$form) {
  if ($form_id == 'forum_node_form') {
    $form['body_filter']['body']['#wysiwyg'] = FALSE;