我正在使用kendoEditor。我在這個編輯器中動態插入文本。 無論何時我在編輯器中插入文本,光標焦點都不正確。 我已經使用下面的代碼來專注於編輯器。KendoEditor在文本末尾設置焦點
var editor = txt.data("kendoEditor");
var editorValue = editor.value();
editor.value('');
editor.value(editorValue + selectedName);
editor.focus();
與此代碼,每次集中在編輯器的啓動時間。
但是,我需要關注插入文本的末尾。
那麼,我該如何實現呢?
有沒有解決這個問題的方法?
嘗試http://stackoverflow.com/questions/11860831/putting-cursor-at-end-of-textbox-in-javascript –
此解決方案是輸入#文本框。在我的情況下,這是KendoEditor。 –