Insert script on content-editable with rangy, avoid lose selection