Turning on rich text editing for drupal webform emails

This is a total hack and if someone can turn it a proper module, please do but I got it to work by commenting out line 269 of webform.emails.inc

'#wysiwyg' => webform_email_html_capable() ? NULL : FALSE,

Drupal 7 update.

Drupalnow has two text formats. textarea and text_format.

Textformat gets the RTE.

Working from the hints here:

http://drupal.stackexchange.com/questions/66001/adding-wysiwyg-to-webfo…

Make a module with the code:

function dd_fixes_form_webform_email_edit_form_alter(&$form, &$form_state, $form_id) {
$form['template']['template']["#wysiwyg"] = true;
$form['template']['template']['#type'] = 'text_format';
$form['template']['template']['#format'] = 'full_html';

$new = array("dd_fixes_webform_email_edit_form_submit");
$form["#submit"] = array_merge($new,$form["#submit"]);
}

function dd_fixes_webform_email_edit_form_submit($form, &$form_state) {
$form_state['values']['template'] = $form_state['values']['template']['value'];
}

Replace dd_fixes with your module name, make a .info file and install the module.

Useful snippits
maincat