diff options
author | Brion Vibber <brion@status.net> | 2010-08-10 15:48:02 -0700 |
---|---|---|
committer | Brion Vibber <brion@status.net> | 2010-08-10 15:48:02 -0700 |
commit | e54d441af044689cc37b1b58104e1b404f55b9db (patch) | |
tree | c142ac4e1bfded3b23b7fc66c0d3271e8c4c28c9 /plugins/TinyMCE | |
parent | bb711cb98d2c63e98b7cb9addf6a0979addaaf3b (diff) |
TinyMCE: workaround for save trigger aborting our AJAX form submission.
Diffstat (limited to 'plugins/TinyMCE')
-rw-r--r-- | plugins/TinyMCE/TinyMCEPlugin.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/TinyMCE/TinyMCEPlugin.php b/plugins/TinyMCE/TinyMCEPlugin.php index f8d85c1ba..3a7656d32 100644 --- a/plugins/TinyMCE/TinyMCEPlugin.php +++ b/plugins/TinyMCE/TinyMCEPlugin.php @@ -115,12 +115,20 @@ class TinyMCEPlugin extends Plugin { $path = common_path('plugins/TinyMCE/js/tiny_mce.js'); + // Note: the normal on-submit triggering to save data from + // the HTML editor into the textarea doesn't play well with + // our AJAX form submission. Manually moving it to trigger + // on our send button click. $scr = <<<END_OF_SCRIPT $().ready(function() { $('textarea#notice_data-text').tinymce({ script_url : '{$path}', // General options theme : "simple", + add_form_submit_trigger : false + }); + $('#notice_action-submit').click(function() { + tinymce.triggerSave(); }); }); END_OF_SCRIPT; |