when using div with conteneditable = true, you need to get the element in front of the cursor when you encounter the cursor problem. Does anyone know the solution?
when using div with conteneditable = true, you need to get the element in front of the cursor when you encounter the cursor problem. Does anyone know the solution?
window.getSelection ()
find out? And then find the parents one floor at a time?
var interval;
clearInterval(interval);
interval = setInterval(()=>{
console.log(window.getSelection(),window.getSelection().anchorNode.textContent.substring(0,window.getSelection().anchorOffset))
},500)
Previous: Tab prevents each refresh from being the first but the current tab option
Next: How to use tweenjs in angular4/Ionic3 (urgent! Wait on the line! )