如何将光标移动到ckeditor5中的文本末尾

2024-01-09

ckeditor5

当我使用editor.editing.view.focus(),光标在文本的开头,如何将光标移动到文本的结尾?


为此,请在编辑器模型 https://ckeditor.com/docs/ckeditor5/latest/framework/guides/architecture/editing-engine.html#model:

editor.model.change( writer => {
    writer.setSelection( writer.createPositionAt( editor.model.document.getRoot(), 'end' ) );
} );
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何将光标移动到ckeditor5中的文本末尾 的相关文章

随机推荐