Remove complete word in contenteditable div on backspace

I am developing a Facebook like comment system where one user can mention an other user this part works fine. However, I want to remove any user mention any new user, that remove user on backspace part having hard time to achieve.

enter image description here

Above snapshot is the actual comment box where I mentioned two users, however I want to remove complete user name on backspace exactly like removing user in JIRA.

<div contenteditable class="form-input" onkeyup="writeComment" id="comment"/>

comment = "Hello Dear <span class="user">Michael Fine</span> please contact  <span class="user">Emily Fine</span> Thanks."

I wrapped user name in span tag to apply CSS and want to remove entire span tag of that particular user whom I want to remove.

Thanks in advance.