📜  将光标设置为输入的结尾 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:32.249000             🧑  作者: Mango

代码示例1
const el = this.editor.ngxWigEditable.nativeElement;
      setTimeout(() => {
        var range = document.createRange();
        range.selectNodeContents(el);
        range.collapse(false);
        var sel = window.getSelection();
        sel.removeAllRanges();
        sel.addRange(range);
      });