Backspace doesn't delete inner html tags of a contenteditable DIV in Firefox
Okay! found the solution... its rather simple than what you would think. I am actually inserting html for links, so using <a>
here. The <a>
tag has attribute set to contenteditable=false and its not getting deleted with a backspace. So I have created an inner <span>
level with contenteditable=true for firefox and that did the trick.
<div contentEditable="true">
<a href="your/url/path" contentEditable="false">
<span contentEditable="true">link here</span>
</a>
</div>
This is required in Firefox only. Other browsers treat this as expected with the span having content contenteditable=false.