I intend to submit a node edit form via an ahah enabled button but the content of the ckeditor-enbled body textarea is not being passed along. It works with ckeditor disabled.
How do I workaround this?
Help will be greatly appreciated.
$form['taxonomy']['calais'] = array(
'#type' => 'submit',
'#value' => 'Refresh Suggestions',
'#ahah' => array(
'path' => 'tagging_plus/callback',
'wrapper' => 'tagging_plus-taxonomy-fields-wrapper',
'effect' => 'fade',
),
);
Comments
Comment #1
togbonna commentedActually, now am able to pass the body textarea content along by calling this CKEditor JavaScript function
Drupal.ckeditorOff('edit-body').The problem now is that the code that calls this function (see above) is being called after the AHAH callback (on clicking the 'Refresh Suggestions' button). As a result you need to click the 'Refresh Suggestions' button twice for the body textarea text to be passed on (this clearly scores low on usability).
So I think the solutions could be:
(1). how to get the above code to execute right before the AHAH callback (Is there any 'beforeSubmit' functions for AHAH callbacks?).
(2). (less elegantly though) how to get the callback to run twice automatically on each click of the 'Refresh Suggestions' button.
(3). How to attach a 'blur' event to the CKEditor body textarea field. This would then fire the callback automatically thereby calling the above function before the user have to click the 'Refresh Suggestions' button.
I can't seem to figure out how to pull off any of the above.
Any other suggestion that would work would do.
Comment #2
a.d2000 commentedHello All,
I am also facing issue which is slightly different using AHAH submit. I am having my custom form with one textarea as a field. I have used CKEditor.
I am using AHAH to submit my form but in $_POST i m not getting value of that textarea field.
below is my textarea field.
It would be a great help if anyone has any solution.
Thanks in advance.
Comment #3
a.d2000 commentedAHAH + TinyMCE issue is resolved.
http://drupal.org/project/ahah_action : ahah_action module is useful to resolve the issue. You will get the values of TinyMCE editor in post variable.
Comment #4
mkesicki commented@a.d2000 this tracker is about CKEditor module. Please don't insert post that are not related with CKEditor.
Comment #5
a.d2000 commentedSorry I didnt notice that. But still ahah_action module is useful to add beforeSubmit action for AHAH callback. In that may be you can disable your editor.
Comment #6
jordan8037310 commenteda.d2000,
Can you post an example of what you did?
Best,
JR
Comment #6.0
jordan8037310 commentedAdded format tags to code.
Comment #7
mpaler commentedIn your custom form code:
Then in your module's .js file