Hello,
Is there a way to get the cursor position in the kendo Editor? I want to give the user the option to add a kind of placeholders to the text in the editor. To do this he selects a variable name from a list, the selected variable will be added to the text.
The simple way is to just append it to the text in the editor;
var body_text = $("[id$='_txtMailBody']").data("kendoEditor").value();
body_text += " %" + selected_item.id + "% ";
$("[id$='_txtMailBody']").data("kendoEditor").value(body_text);
A better way is to find the cursor position an then insert the selected item to the text. But how can I do this?
Thank you for your help.
Is there a way to get the cursor position in the kendo Editor? I want to give the user the option to add a kind of placeholders to the text in the editor. To do this he selects a variable name from a list, the selected variable will be added to the text.
The simple way is to just append it to the text in the editor;
var body_text = $("[id$='_txtMailBody']").data("kendoEditor").value();
body_text += " %" + selected_item.id + "% ";
$("[id$='_txtMailBody']").data("kendoEditor").value(body_text);
A better way is to find the cursor position an then insert the selected item to the text. But how can I do this?
Thank you for your help.