Quiero agregar una palabra, donde está el cursor. Debería ser algo como esto:
addWordToTextarea(word){ var tmpMyTextArea = document.getElementById('myTextArea').innerHTML.value; var tmpCursorPositionInTextarea = document.getCursorFromId('myTextArea'); //does something like this function exist? if(tmpCursorPositionInTextarea){ //add word to tmpMyTextarea on position where cursor is; } else { tmpMyTextArea = word; } }