I need this too. Installed htmlmail module. Works fine, the received mail message is in html format.
The textfield doesn't show the wysiwyg editor yet. For that I use a form alter, changing the field type from 'textarea' to 'text_format'.
But that throws an error. Caused by the fact that the form alter makes an array of $form_state['values']['message'] instead of a single value. So I added an additional validation handler to the form. Below the complete code.
function MYMODULE_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'node_registration_registrations_broadcast_form') {
$form['message']['#type'] = 'text_format';
$form['#validate'][] = 'MYMODULE_form_validator';
}
}
function MYMODULE_form_validator(&$form, &$form_state) {
$form_state['values']['message'] = $form_state['values']['message']['value'];
}
Comments
Comment #2
rudiedirkx commentedEnable Mime Mail? That will send HTML mail.
Or do you want the textareas to be WYSIWYGs?
Comment #3
hanskuiters commentedI need this too. Installed htmlmail module. Works fine, the received mail message is in html format.
The textfield doesn't show the wysiwyg editor yet. For that I use a form alter, changing the field type from 'textarea' to 'text_format'.
But that throws an error. Caused by the fact that the form alter makes an array of
$form_state['values']['message']instead of a single value. So I added an additional validation handler to the form. Below the complete code.Comment #4
rudiedirkx commentedMore correct would be
because that's what the format is for: to run filters, and
check_markup()does that.Comment #5
hanskuiters commentedThat IS correct, thanks.