I have a content type that has a custom Pull Quote field and a body field. I want the body field to use TinyMCE and the Pull Quote field to use just a regular textarea. Right now I can turn TinyMCE off or on for both but not individually. Is it possible to turn tinymce off by default for certain fields? The ideal would be to have TinyMCE listed as a widget when creating the custom field.

Comments

brooklynwebguy’s picture

Might as well reproduce the solution here even though it is elsewhere in the site.

In template.php, the following will disable TinyMCE for any text field but 'body' fields. If you want something more granular, you have to add more fields to the switch statement.

function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
  switch ($textarea_name) {
    // Enable tinymce for these textareas
    case 'body':
      break;
    // Disable tinymce for all other textareas
    default:
      unset($init);
  }
  // Always return $init
  return $init;
}

Here's the thread: http://drupal.org/node/72940

I think it would be better if TinyMCE once installed was in the widget list, but this is fine nonetheless.