Adding WYSIWYG to webform email template field I want to enable the WYSIWYG editor so I can create HTML mail from webform email templates. (Yes, I know some people don't like HTML in emails.)
I have created a module, and I'm using this code:

function mymodulename_form_alter(&amp;$element, &amp;$form_state, $context) {
  if (isset($element['template']['template'])) {
    $element['template']['template']['#wysiwyg'] = true;
    $element['template']['template']['#type'] = 'text_format';
  }
}


This is great, and the WYSIWYG is enabled. Unfortunately it changes the values from a string to an array, and I can't figure out how to convert them back again. I was hoping this would help, but hook_field_attach_presave() doesn't seem to fire for that form. In fact, I can't find any hooks that fire for that form.

Any suggestions?
HTML emails have a different standard than WYSIWYG editors. For example HTML emails use tables instead of divs, you can't use paddings etc.

So I don't think that HMLT email creating with WYSIWYG editor is a good idea...