pause and play update automatically in text editor (a lot hacky, sorry)