trim for checking text editor content