When an element is contentEditable, its child elements can be deleted. If one of those child elements is not contentEditable, the content of the child cannot be edited, but the element itself can still be deleted. You can see this demonstrated in the following example.
Is it possible to prevent these child elements from being deleted?
div {
height: 100px;
border: 1px solid #CCC;
margin: 5px;
padding: 5px;
width: 300px;
}
span {
color: #999;
}
<div contentEditable="true">Hello <span contentEditable="false">world</span>!</div>