Posted by mehtatejas on January 1, 2012 at 11:06am
4 followers
Jump to:
| Project: | Wysiwyg |
| Version: | 7.x-2.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Issue Summary
Hi,
Wysiwyg works fine for the node forms when called as node/add/.
When I called it using drupal_render(node_add()); in ajax callback, form gets loaded,however, editor is not loaded.
Please help me.
Comments
#1
Are there any errors in the browser's JavaScript console when performing the AJAX-triggering actions?
Are you doing anything else in the AJAX callback other than calling
drupal_render(node_add());?How is the callback initiated? Are you using the Form API #ajax property?
Are you sure you need to call
drupal_render()?Please see the #unrendered API change and the #menu_callback_array API change.
#2
I was running this code by getJSON method. Hence wysiwyg js is not getting attached even with attachbehaviours.
With 'use-ajax' in drupal link works fine.
#3
Hmm, I'm not sure I understand what you mean.
Could you post or link to the code you are using so I can try on my development server?
#4
mehtatejas, me too, I don't understand, I use this field definition:
<?php$myform['description'] = array(
'#type'=>'text_format',
'#default_value' => isset($item['description'])?$item['description']:'',
'#title'=> t('description'),
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
);
?>
where do I add 'use-ajax' ?
is someway related to http://drupal.org/node/356480
#5
If you apply the patch from #1391034: wysiwyg is not loaded when used with node_add() in ajax forms, you'll also need the D7 Core patch from #1287368: Drupal.settings.ajaxPageState.css gets overwritten (unless it's already made it into 7.x-dev by the time you read this). That might fix things, but I can't guarantee it since I don't have the whole callback code or know how it's requested.