I'm trying to add wysiwyg to a textarea added through CCK.

In my hook_form_alter I can alter the properties of the field no problem. Using this it seems like it should be possible to add 'format' to the element and then use filter_format, it's adds the filter select information but seems to break the body implementation of wysiwyg.

Documentation seems to be pretty sparse on this topic, does anyone know the correct way of implementing this or any complete documentation?

  • Do you have to do this in code, or are you open to just using a GUI solution – iStryker Jul 11 '11 at 13:59

I usually do this by installing better formats module. This give you the option to set the default format for a cck field when you create it.

| improve this answer | |
  • Thanks, the reason I was trying to do it using code was because I need the settings to be exportable but I see there is a patch for better formats so I'm using that instead. – digital Jul 11 '11 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.