I have a contenteditable div
I need to get the last word from caret position and on certai
Tobías' solution works well for single-line contenteditable div. But if you add multiple lines, it doesn't work anymore.
contenteditable
Here is a general solution that works for both single-line or multiline contenteditable div.