el-text-editor 0.0.69 → 0.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -646,16 +646,16 @@ class ElTextEditorComponent {
646
646
  }
647
647
  }
648
648
  // // Move caret to the end of the editor content
649
- // private moveCaretToEnd(editor: HTMLElement) {
650
- // const selection = window.getSelection();
651
- // const range = document.createRange();
652
- // if (editor.lastChild) {
653
- // range.selectNodeContents(editor);
654
- // range.collapse(false); // Collapse to the end
655
- // selection?.removeAllRanges();
656
- // selection?.addRange(range);
657
- // }
658
- // }
649
+ moveCaretToEnd(editor) {
650
+ const selection = window.getSelection();
651
+ const range = document.createRange();
652
+ if (editor.lastChild) {
653
+ range.selectNodeContents(editor);
654
+ range.collapse(false); // Collapse to the end
655
+ selection?.removeAllRanges();
656
+ selection?.addRange(range);
657
+ }
658
+ }
659
659
  init_Func(html) {
660
660
  if (html) {
661
661
  let editor = document.getElementById('editor');
@@ -695,16 +695,16 @@ class ElTextEditorComponent {
695
695
  });
696
696
  observer.observe(editor, { childList: true, subtree: true, characterData: true });
697
697
  }
698
- moveCaretToEnd(editor) {
699
- const selection = window.getSelection();
700
- const range = document.createRange();
701
- if (editor.lastChild) {
702
- range.selectNodeContents(editor);
703
- range.collapse(false); // Collapse to the end
704
- selection?.removeAllRanges();
705
- selection?.addRange(range);
706
- }
707
- }
698
+ // private moveCaretToEnd(editor: HTMLElement) {
699
+ // const selection = window.getSelection();
700
+ // const range = document.createRange();
701
+ // if (editor.lastChild) {
702
+ // range.selectNodeContents(editor);
703
+ // range.collapse(false); // Collapse to the end
704
+ // selection?.removeAllRanges();
705
+ // selection?.addRange(range);
706
+ // }
707
+ // }
708
708
  // init_Func(html: any) {
709
709
  // if (html) {
710
710
  // let editor = document.getElementById('editor');