I created a new CCK field as "Company Description" for my content type named "Seller".

This CCK field is made as a Text Field.

How can I make this field use the TinyMCE editor while editing. Now can only use normal textbox.

Please help.

Thanks in advance.

Comments

chrisabbato’s picture

As far as I know, the wysiwyg editors only work on textarea's so it should *not* show up on your textfield

nirenj’s picture

Thanks for reply.
Is there any way to hack it, so it will show up for textfield also.??
Thanks.

chrisabbato’s picture

I will take a look real quick, may be as easy as changing around a couple jquery lines... may not.

--edit--

This is a long shot, as I don't have drupal 5 installed, also I don't think textfield's allow HTML input so that might cancel any effect this has.

It looks like this is where the textarea is added on to, and from what I can tell this is the only area it checks for a textarea in particular.
If I were to try something out I would copy that line and replace the $type['textarea'] with $type['textfield']

This is located in tinymce.module

/**
 * Implementation of hook_elements().
 */
function tinymce_elements() {
  $type = array();

  if (user_access('access tinymce')) {
    // Let TinyMCE potentially process each textarea.
    $type['textarea'] = array('#process' => array('tinymce_process_textarea' => array()));
    $type['textfield'] = array('#process' => array('tinymce_process_textarea' => array())); // <-- I would try this for a first effort
  }

  return $type;
}
nirenj’s picture

Thanks, but nothing happened.

It is still the same.