A text editor for writing pinyin