chmln / vue-wysiwyg

A lightweight WYSIWYG HTML editor for Vue.js
https://chmln.github.io/vue-wysiwyg/
MIT License
555 stars 134 forks source link

Cursor position? #92

Open luizhenriquerdias opened 5 years ago

luizhenriquerdias commented 5 years ago

Hey guys! Is there a way to get the cursor position? Thanks!

annibuliful commented 5 years ago

There is no this feature I guess

raicabogdan commented 3 years ago

This is what I use.

        insertText(text) {
            var range, sel = window.getSelection();

            if (sel.rangeCount) {
                range = sel.getRangeAt(0);
                range.insertNode(document.createTextNode(text));
            }
        },