get text editor working correctly