Hey, if you use rangy alpha (it seems very stable atm) you can use the [TextRange](https://code.google.com/p/rangy/wiki/TextRangeModule) which allows you to save the selection without adding random HTML elements that may be lost if the element is deleted. I do this as a user of wysihtml5x (save selection with `saveCharacterRanges`, perform wysihtml5x command, restore selection `restoreCharacterRanges`) to prevent the selection going awry after executing some commands.