Text Editor with sorting functionalities of words and numbers