I have a text area:
<textarea type="input" id="txtText">Hello+world-how*are+you</textarea>
I want a way for backspace to delete a whole word every time it is clicked using Javascript or Angular js. When I press backspace I want it to split by operators and delete from the end. The first backspaces in the above example would delete 'you' then 'are' then 'how' and so on. But if the mouse is on 'world' then it deletes 'world' first, then 'Hello'.
Here is a solution than uses the
data
attribute to match for changes: jsFiddle