Now when you choose the Insert HTML command in the popup menu on each item, the text is inserted at the cursor location instead of at the beginning of the text.
If there's a selection the HTML replaces the selected text.
I had to figure out how and when to save and restore the selection, because pulling down the menu temporarily loses the focus on the editing object.