Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
dwightaspinwall CreditAttribution: dwightaspinwall commentedMy 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.
Comment #2
Kristen PolAh... 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".
Comment #3
adamwhite CreditAttribution: adamwhite commented