Hi, Telerik:
The scenario:
1. goto http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx
2. Clear editor's content.
3. Press <Enter> key. Cursor jump to second line. (expected)
4. Press <Space> key. Cursor jump to first column of second line (P, Div mode) or first line. (Br mode)
But if I Press <Shift+Enter> then <Space>, it worked as expected.
I tried two methods to make <Enter> as <Shift+Enter>, but it worked not fine.
1. RadEditor "OnClientCommandExecuting"
function _Editor_onCmdExecuting(oSender, oArgs) {
if ($telerik.isIE && oArgs.get_commandName() === "EnterNewLine") { oArgs.set_cancel(true); oSender.fire("ShiftEnter", null); }
}
or
2. RadEditor "OnClientLoad" attacted onkeydown event
function _Editor_onLoad(oSender, oArgs) {
oSender.attachEventHandler("onkeydown", function (e) {
if (e.keyCode === 9) { oSender.pasteHtml(" "); $telerik.cancelRawEvent(e); }
else if (e.keyCode === 13) { oSender.pasteHtml("<
br
>"); $telerik.cancelRawEvent(e); }
});
}
Any idea make <Enter> as <Shift+Enter>?
Telerik version: 2015.3.1111.40