title: How can I remove selected text and keep empty HTML tags?
body: <p>User makes a selection inside of an HTML code in a web browser (rendered html).</p>
  <p>Then I need to remove the <strong>text</strong> from the selection but keep the <strong>html tags</strong>.</p>
  <p>Selection example:</p>
  <p><a href="https://i.stack.imgur.com/p5P58.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p5P58.jpg" alt="enter image description here" /></a></p>
  <p>Desired output:</p>
  <p><a href="https://i.stack.imgur.com/Jvnk6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Jvnk6.jpg" alt="enter image description here" /></a></p>
  <p>I can get the range via <code>selection.getRangeAt(0)</code> and therefore access the start / end nodes. I think I need to loop through the nodes between the start / end nodes but I can't figure out how; the start/end nodes are not necessarily siblings and this complicates the algorithm...</p>
  <p>Any help would be much appreciated!</p>