Prevent Default Behavior of Enter key in Editor
Product | Progress® Kendo UI® Editor for jQuery |
Description
How can I prevent the default behavior of the Enter key in the Editor widget?
Solution
- You can handle the
execute
event of the Editor component and prevent the default behavior of the executing command, corresponding to the event of the Enter button - "insertParagraph".
The following example demonstrates how to achieve the desired scenario:
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
execute: function(e){
if(e.name === "insertParagraph"){
e.preventDefault();
}
}
});
</script>