textEditor allow code input and display error