Added Text editor function