Programatically select text in a contenteditable HTML element