我正在使用RadEditor和一个将一些文本放入RadEditor的按钮。我想知道在点击按钮并将内容放入RadEditor之后,我可以将光标放在内容的末尾。现在,当我给RadEditor一个焦点时,它刚刚开始。
请帮助!!
oshi
答案 0 :(得分:0)
var editor = *you'll need to provide the $find() functionality to get an instance of your page's editor*;
editor.setFocus();
var doc = editor.get_document();
doc.execCommand("SelectAll", null, false);
//Collapse selection to the end
editor.getSelection().collapse();