return the range object of the word before or upon carret position in contenteditable div
问题 After research, i came accross few answers by @Tim Down but still did not quench my thirst. What i want is to delete the contents of range containing the word before or upon carret in contenteditable div. Assuming | represent carret position. Example: @TimDown is a #GoodJavascriptProgrammer| and .... if i click a delete button, i should delete word #GoodJavascriptProgrammer with # symbol included and set cursor back to its position. see my fiddle delete last string before carret function