On a webform e-mail template, it should be possible to allow the use of WYSIWYG editor, in my case, CKEDITOR. This could be a conditional option when the user chooses do enable HTML E-mail sending, for example. I know that many issues can be raised enabling that, for instance, the HTML e-mail not be totally accurate when using tables, special formatting, etc. However, this option suffices when the need is just a simple markup: add color do fonts, boldface, bigger/smaller text, etc.

Other forms are already integrated with WYSIWYG, for example, the "Message Confirmation" on "Forms configuration".

Currently, the only way to enable WYSIWYG editor on form e-mail template is with PHP code and custom modules:
http://drupal.stackexchange.com/questions/66001/adding-wysiwyg-to-webfor...

Comments

danchadwick’s picture

It appears that the technique used for Drupal 6 and CKEditor no longer works. Setting #wysiwyg to NULL doesn't work. An issue is what text format to use. The "Full" can't be hard coded. And if it isn't, then the text format needs to be saved too.

All-in-all, this isn't a trivial change.

danchadwick’s picture

At this point, I suspect that the '#wysiwyg' entries on textarea form elements are not needed, since it seems both the wysiwyg and ckeditor modules use only text_format form elements. These non-functional entries should be removed.

Further complicating this is the checkbox to send the text as html. Already webform uses some jQuery trickery to toggle the display of the default versus custom template. I suspect we need two custom templates: a plain text one with a textarea and an html one with a text_format.

Further complicating this is that the full text format cannot be guaranteed to exist. Drupal 7 allows you to "disable" the format, which removes it from the UI. You can not re-create it and can only re-enable it by editing the database table. The implication is that webform would have to check both the existence of an html-capable email system AND the presence of an enable full text format. Note that since this is just an e-mail, full text should be allowed even if the current user doesn't have permission to that because the results are never displayed in the browser as HTML.

Given all this, I don't see this happening unless someone specifically sponsors the feature OR posts a patch.

danchadwick’s picture

Status: Active » Closed (won't fix)
Issue tags: -template, -email, -html

Closing due to complexity and for lack of activity, patch, and/or sponsorship.

At some point, we might want to delete the '#wysiwyg' form definition entries. I am leaving them for now because there is some slight possibility that one or more of the wysiwyg modules will implement a feature to add their editor to a textarea, rather than a text_format.