Implement the text editor context menu.