Project:AHAH helper
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I have a select field where one option shows an textarea. But after ahah, it's just a blank textarea and not a ckeditor textarea anymore.

So I tried to submit all javascript settings:

drupal_json(array(
    'status'   => TRUE,
    'data'     => theme('status_messages') . drupal_render($form_item),
    'settings' => $settings,
  ));

But after secound ahah submit it breaks again and I get the blank textarea again.

Anyone who found a solution?

Comments

#1

Just encountered the same issue.

Haven't tested this through-and-through, but this might do the trick.

Add the following to your select form element:

'#attributes' => array(
  'onchange' => "CKEDITOR.instances['id-of-your-ckeditor-instance'].destroy();return false",
),

Javascript code gotten from http://stackoverflow.com/questions/1794219/ckeditor-instance-already-exists

nobody click here