Using the webform module, adding a new webform node shows several textareas such as 'Description' and 'Confirmation message'. The former doesnt get a wysiwyg attached, while the latter does.
No wysiwyg for description:
<div id="edit-body-wrapper" class="form-item">
<label for="edit-body">Description: </label>
<div class="resizable-textarea"><span><textarea class="form-textarea resizable textarea-processed" id="edit-body" name="body" rows="10" cols="40"/><div class="grippie" style="margin-right: -2px;"/></span></div>
<div class="description">Text to be shown as teaser and before the form.</div>
</div>
While the #edit-webform-confirmation-wrapper does get one.
Is there a fix? A place to set extra/custom textarea's for wysiwyg? I maybe overlooked documentation. Didnts see help in readme.txt.
Comments
Comment #1
twodThis happens because the Webform developers have chosen not put a format selector (or even an input format) for the description field. Compare lines 661-669 to 671-680 in webform.module (6.x-2.9).
Wysiwyg module doesn't know which editor to attach if there's no selector/description of the allowed format, as editor profiles are linked to input formats.
Note that to add a format selector (returned by the filter_form call) to the description field, the confirmation message field will need some alterations as both selectors need to use the 'format' key. Each field/selector pair can be 'wrapped' to get around this, but that's a different story.
There is no per-field control over what get an editor attached to it. If a field can have an input format (and Wysywiyg module can find the selector or format-description if only one is available), an editor will be attached there unless it has been temporarily turned off by clicking the 'Disable Rich-Text editing' link.
The Better Formats module is meant to be able to control which content types, user roles, and soon also CCK fields which get to use specific input formats.
If you need a wysiwyg editor (thus input formats) on your webforms, I suggest you create a feature request issue on their queue. I took a quick look at their code and it looks like their latest version (for Drupal 7 I think) uses the form from node.module, so then it should already have a format selector and Wysiwyg module could attach editors there.
Comment #2
Anonymous (not verified) commentedAlright, thanks a lot for figuring this out!
Comment #4
gpk commentedApparently this is fixed in webform 6.x-3.x, but that release still carries warnings about it being for developmental use only. See #599288: Wysiwyg on Confirmation message, not description.