【问题标题】:How can I move cursor to end of text in ckeditor5如何将光标移动到ckeditor5中的文本末尾
【发布时间】:2019-09-28 01:02:06
【问题描述】:

ckeditor5

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

【问题讨论】:

  • 请提供更多上下文信息。将有助于解决您的问题。

标签: ckeditor5


【解决方案1】:

为此,请在editor model 中设置选择:

editor.model.change( writer => {
    writer.setSelection( writer.createPositionAt( editor.model.document.getRoot(), 'end' ) );
} );

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-08
    • 2011-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多