This is a migrated thread and some comments may be shown as answers.

Disable ctrl-enter

2 Answers 32 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Javier
Top achievements
Rank 1
Javier asked on 17 May 2012, 05:23 PM
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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 18 May 2012, 07:01 AM
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.
0
Javier
Top achievements
Rank 1
answered on 21 May 2012, 12:42 PM
Thanks.

I ended up assigning a different shortcut to 'new paragraph' in the editortool markup and that fixed the issue.
Tags
Editor
Asked by
Javier
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Javier
Top achievements
Rank 1
Share this question
or