Add undo/redo range bookmark and helper functions(dom).