有没有办法将光标设置在CKEditor内容的末尾?
该开发人员也问过,但未收到任何答案:
http://cksource.com/forums/viewtopic.php?f=11&t=19877&hilit=cursor+end
我想将焦点设置在CKEditor中文本的末尾。当我使用时:
ckEditor.focus();
它带我到CKEditor内部的文本开头。
最佳答案
Dan的回答对我来说产生了奇怪的结果,但是进行了细微的更改(除了拼写错误之外)使其起作用:
var range = me.editor.createRange();
range.moveToElementEditEnd( range.root );
me.editor.getSelection().selectRanges( [ range ] );
关于ckeditor - 如何在CKEditor中将光标位置设置为文本结尾?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4536532/