Closed (fixed)
Project:
Recipe
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2008 at 17:07 UTC
Updated:
20 Oct 2010 at 17:13 UTC
The input format selection isn't for an individual field. You couldn't have different formatting for different the fields: body, instructions, notes, source. This makes wysiwyg module unable to attach a wysiwyg editor like TinyMCE to the textarea.
Comments
Comment #1
scottprive commentedWhat do you mean by "The input format selection isn't for an individual field. "?
Specifically, is this a problem with the HTML that Recipe generates?
I'm not familiar with this problem. I'm not using TinyMCE or FCKEditor, but I thought they attached themselves to "all textarea" HTML widgets once you enable them.
Comment #2
jvandervort commentedMoving to feature request as this is normal Drupal behavior.
Comment #3
rnavarette commentedFrom looking at this post (http://drupal.org/node/358316) I was able to get TinyMCE working on the input fields that I wanted (body, instructions, notes). The change itself seems fairly trivial. (Finding out how to do it after using drupal for only a few days, not so trivial.) Take a look at the below snippets from recipe.module:
Original:
function recipe_form(&$node, $form_state){
...
$form['body'] = array(...);
...
$form['instructions'] = array(...);
...
$form['notes'] = array(...);
...
$form['filter'] = filter_form($node->format);
...
return $form;
}
Fixed:
function recipe_form(&$node, $form_state){
...
$form['body']['body'] = array(...);
$form['body']['format'] = filter_form($node->format, NULL, array('body_format'));
...
$form['instructions']['instructions'] = array(...);
$form['instructions']['format'] = filter_form($node->format, NULL, array('instructions_format'));
...
$form['notes']['notes'] = array(...);
$form['notes'']['format'] = filter_form($node->format, NULL, array('notes'_format'));
...
// leaving this uncommented causes an extra format settings section to be shown... can this
// be removed (as shown) or is it still used for some other settings that i missed?
//$form['filter'] = filter_form($node->format);
...
return $form;
}
Could one of the developers confirm this for me and possibly integrate it into the codebase?
Thanks,
ray
Comment #4
scottprive commentedComment #5
canadrian commented+1 on this. I would really like WYSIWYG to work with the Recipe module.
Comment #6
jvandervort commentedPatch looks good and it tested ok. Please give it a test yourselves as well.
Just added to the dev snapshot dated on/after May 10.
Comment #8
JulienD commentedHello there
I tried to add a wysiwyg on the instructions field, but nothing happend
The only way I found to do it is to create a form_alter and to do a like it's was said in comment #3
Here is an example :
Comment #9
jvandervort commented@JulienD,
Please add new issues for new items.
You might want to try the latest dev version available tonight/tomorrow for your problem.