Smart edit text