fixed an issue where the editor breaks if textarea was empty