I\'m trying to read the content of a contentEditable div and extract the currently active word. ie. the word which was just entered or one which was modified. <
I found a workaround. Previously, I was using innerHTML to get the contents.
Now, I'm using targ.firstChild.nodeValue where targ is the element whose content is needed.Then checking with str.charCodeAt(i)==32 || str.charCodeAt(i)==160 .