Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

CmdReturnSubmit for Saving Comments

I've been banging away at this a bit and could use some help, or some fresh eyes.

I want to add the functionality to the CmdReturnSubmit plugin to let a user press Cmd/Ctrl and Return to submit an edited comment, as if they had clicked the 'Save Comment' button.

How do I specify which textarea (id='Form_Body' in both cases) to attach the event to so that I can add something like the following code to class.cmdreturnsubmit.plugin.php?

$('#Form_Body').keydown(function(event){
    if((event.ctrlKey||event.metaKey) && ((event.keyCode == 0xA)||(event.keyCode == 0xD)))
        $('#Form_SaveComment').click(); 
    });

Comments

  • Options

    I have added support for this. Thanks for pointing this out!

  • Options

    Excellent! Thank you so much!

Sign In or Register to comment.