So, I have to add <br\> at end of the kendo editor content and move focus at last line. To achieve this I have added following code:
@(Html.Kendo().EditorFor(model => model.PageContent)
.Encode(false)
.Tools(i=>i.CustomButton(cb=>cb.Name("CustomTool").ToolTip("Add New line at end").Exec(@<text>
function(e)
{
var editor = $(this).data("kendoEditor");
var getCurrentContent = editor.value();
editor.value(getCurrentContent+'<br\>');
editor.focus();
var range = editor.createRange();
range.selectNodeContents(editor.body);
range.collapse(false);
editor.selectRange(range);
}
</text>)))
I am not able to move focus to end line of the content. Any suggestion would be helpful. Thanks.