a problem of ctrl+enter submit

Last post 04-10-2009, 3:37 AM by rewalax. 0 replies.
Sort Posts: Previous Next
  •  04-10-2009, 3:37 AM 50968

    a problem of ctrl+enter submit

    I set a shortcut key to submit the content of the cute editor with "ctrl+enter",the code is as follows

            function CuteEditor_OnInitialized(editor) {
                if (editor.IsReady) {
                    editor.HookEvent(editor.GetDocument(), "keydown", function(e) {
                    var e = e ? e : editor.GetDocument().event;
                        if (e.ctrlKey && e.keyCode == 13) {
                            document.getElementById("<%= buttonPost.ClientID %>").click();
                        }
                    });
                }
            }
     
    it worked , but the result content will add a "<br>" or "<div>&nbsp;</div>" (that means when i press ctrl+enter to submit, the "enter" is transfered to a html code which should not be. ) How can i solve this problem?
     
    Sorry for my English 'cause it's not my native language.If you dont understand ,please reply.I'll try my best to explain it.thanks.
View as RSS news feed in XML