return null instead of 0, 0 for selection if it can't be found
fix undo index going out of bounds in some cases
don't use a public memoization of the selection in the editor
use textContent instead of stripping HTML in undo