Closed (fixed)
Project:
Webform
Version:
6.x-2.9
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2009 at 16:33 UTC
Updated:
24 Feb 2010 at 22:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
chromix commentedI should also note I'm using the latest version of WYSIWYG and TinyMCE. I've also posted this in the WYSIWYG bug queue:
http://drupal.org/node/381174
Comment #2
sunHm. Webform should produce the same output like filter_form() would. I did not try to replicate this issue, but from the description it sounds like it does not.
Comment #3
quicksketchSeems that this is still the case even in 6.x and the latest Webforms. I haven't seen WYSIWYG "create an editor around the token help", but it doesn't create an editor at all and may through a JS error. My guess is that Webform doesn't group the textarea and the input format in a dedicated grouping of fields in the FAPI array, which throws off WYSIWYG somehow.
Comment #4
ashley.maher@didymodesigns.com.au commentedThanks for adding this. I thought I was going nuts.
Drupal-6-12
WYSIWYG-6.x-2.0
TInyMCE-3.2.4.1
WebForm-6.x-2.7
There is no formatting ability in the form element area at all. No WYSIWYG, when I use html to set out paragraphs the tags are stripped.
Ideas for temporary hacks to get around this great fully received.
Regards,
Ashley
Comment #5
mrfelton commentedsubs
Comment #6
awolfey commentedsubscribe
Experiencing this with fck.
Comment #7
awolfey commentedI was able to get this to work by patching markup.inc.
I put a grouping "['markup']" around the markup ['value'] and the filter ['format'].
I'm not sure what else this might break.
Can provide a patch if desired.
Comment #8
awolfey commentedThis will also be needed in webform_components.inc
In function webform_component_update($component) add this
above this line.
In function webform_component_insert($component)
add
above this line.
Sorry for no patch. Will get around to it.
Basically, we are wrapping the field and format filter together for markup editing. Then we remove the wrapper before saving the form component so the display and component list works.
Comment #9
sun@awolfey: Can you provide a proper patch?
Comment #10
awolfey commentedUmmmm. Don't try this yet...
Comment #11
awolfey commentedI made edits to #8 that should work. However, this is largely untested, so use at own risk.
I am slammed at the moment, but I will get a patch rolled tonight or tomorrow morning. (Patching not my strong suit.)
Comment #12
awolfey commentedHere is a patch. It is working for me, but I haven't tested it thoroughly.
Comment #13
jhodgdonJust a note that WYSIWYG will put an HTML editor on any text area field that is immediately followed by an input format field named 'format', and these two fields have to be in the same level of the array.
So I think it would be better just to move the input format up to the next level of the array, rather than moving both of them into 'markup' part of the array, since that obviously resulted in some hacking being necessary farther down in the patch.
Comment #14
sunSimply define
'#parents' => array('value'),
here and you can remove the other changes - in the insert handler.
This review is powered by Dreditor.
Comment #15
hepabolu commentedI get the impression I need this patch, but I'm not proficient enough in PHP to understand the comments made in #14 to apply them to (what seems to be) the patch provided in #12. Could someone please elaborate or update the patch?
Thank you.
Comment #16
jim kirkpatrick commented#12 + #14 works for me too...
@Hepabolu: the
'#parents' => array('value'),line goes directly under the'#default_value' => $currfield['value'],line, or around line 41 of markup.inc.Comment #17
quicksketchI've committed the attached patch to all branches.
Comment #18
roball commentedYeah, just tested it and can confirm this works fine now. Thanks!
Comment #19
quicksketchThanks again roball. Everyone using the 2.x branch, I'll be putting out a 2.10 version once we finally get some resolution over in #604958: %profile and %server default values broken.