title: Html: Contenteditable how to detect before deleting element after pressing backspace?
body: <p>I am making a text editor with <code>&lt;div contenteditable&gt;</code>. I want to prompt a confirmation message before the user deleting image element inside the editor. So when the user press backspace, before deleting the image element, there should be a prompt &quot;Are you sure you want to delete the image?&quot;.</p>
  <p>How can I do this?</p>