I can only get the cursor position of input and textarea elements, but how do I do this with div elements that contain contenteditable = "true"?
getCursor() {
const text = this.$refs.test;
const value = text.selectionStart;
console.log(value); // result is undefined
}
<div
ref="test"
contenteditable="true"
:v-html="inputIntegrationHMTL"
@input="getCursor($event)"
> </div>