Disable ctrl-enter

3 posts, 0 answers
  1. Javier
    Javier avatar
    35 posts
    Member since:
    Aug 2011

    Posted 17 May 2012 Link to this post

    Is there a way to disable the radeditor action that happens when ctrl-enter is pressed?  We have a specific function that's supposed to occur and add text to the editor, but it adds the text, then runs a routine that inserts an empty paragrah.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 18 May 2012 Link to this post

    Hi Javier,

    Here is the sample code that I tried to disable Ctrl + Enter in RadEditor.

    JS:
    <script>
    function OnClientCommandExecuting(sender, EventArgs)
     {    
            if (EventArgs.get_commandName() == "InsertParagraph" || EventArgs.get_commandName() == "EnterParagraphMozilla" || EventArgs.get_commandName() == "InsertParagraphSafari")
            {
                EventArgs.set_cancel(true);
            }
     }
    </script>

    Hope this helps.

    Thanks,
    Princy.
  3. Javier
    Javier avatar
    35 posts
    Member since:
    Aug 2011

    Posted 21 May 2012 Link to this post

    Thanks.

    I ended up assigning a different shortcut to 'new paragraph' in the editortool markup and that fixed the issue.
Back to Top