Thanks for the PET module! It's awesome.

I'm trying to integrate it so that the Wysiwyg editor (in my case, CKEditor) shows up and *works* when editing a PET. I added this code:

function mymodule_form_alter(&$form, &$form_state, $form_id) {

  switch( $form_id ) {
    case 'pet_form' :
      // This is how to add the wysiwyg onto a form field but saving the text 
      // is causing the text to become messed up.
      $form['mail_body']['#type'] = 'text_format';
      $form['mail_body']['#format'] = 'wysiwyg_editor'; // This is the text format
      break;

    default:
      break;
  }
}

This makes the Wysiwyg editor show up and I can use it, but once the PET is saved, the text is wiped out and replaced with "Array".

Any ideas on how to make it work?

Comments

dwightaspinwall’s picture

Category: support » feature

My guess is that to do this right requires code changes to the module, so I'm changing this to a feature request. It's also related I think to #1879296: Support input formats (text formats) in body of email template and I'm open to patches or, if I don't get any, I'll try to push this up in the priorities. Thanks for the request.

Kristen Pol’s picture

Ah... agreed, that it's related to #1879296: Support input formats (text formats) in body of email template :) Perhaps if that one is solved, this one will be "fixed".

adamwhite’s picture