2

How do I use CKEditor for the 'email template' field when setting an automatically generated email for a webforms submission.

The email template field is found when you go to Content of type 'webform' > Click the Webform Tab > Click the sub-tab Emails > And edit an existing automatic email.

I want to render this textbox as CKEditor and have the email follow through with any bold, underline and heading HTML formatting.

2
  • It's not a good idea to add html to emails, gmail, hotmail, etc... use to delete tags, css, etc... Commented Oct 24, 2012 at 13:32
  • All major email clients have HTML formatting. Just need to make sure the header sends the email as HTML rather than plain text. Commented Oct 24, 2012 at 16:07

1 Answer 1

1

I think the main goal is to receive HTML-formatted emails triggered by Webform module, right? This is how I achieved it:

  1. Create and tune a new Text Format, specifically for emails (admin/config/content/formats)
  2. Install Mime Mail module. It enables you to send HTML-formatted emails. Make it use the just-created text format in settings.
  3. Install Mail System module. It provides you the UI for changing mail system globally or per module, if needed. Simply speaking, with this module you can easily configure HTML mail e.g. for Webform, but leave plain-text format for system emails.
  4. You can use HTML tags in Webform > E-mails > Edit > E-mail template textarea. Mails from the website will be HTML-formatted.

Yes, it does not bind CKEditor to E-mail template textarea, but do you really need it? (If yes, I believe it is possible by creating a custom module that overrides the webform-email-edit-form form changing the element type from "textarea" to "text_format", see e.g. this topic).

Upd. I have just found a separate module for doing the latter thing: Webform Email Input Filter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.