This is a migrated thread and some comments may be shown as answers.
Radeditor - Cancel Enter Key
1 Answer 2 Views
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 27 Mar 2018, 03:49 PM

How do I cancel the enter key inside radeditor?   

I found other examples from telerik support suggesting to use cancelRawEvent.  This function does not work to prevent enter key, although it seems to block other keys just fine.  I have tried all sorts of combinations of preventDefault, stopPropagation, set_cancel, return false, etc.  Nothing stops it from inserting a carriage return into the radeditor.  Is it just not possible?

 

function EditorLoad(editor, args) {
        editor.attachEventHandler("onkeydown", function(e)     
        {
            if (e.keyCode == 13) {
                $telerik.cancelRawEvent(e)
            }
        });

}

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 27 Mar 2018, 09:07 PM
Hello Josh,

Please review the following KB article on the matter: Cancel Enter key execution in the content area.

Let me know if you have any other questions.

Best regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Josh
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or