Fix context menu of rich text editor and cleanup related UI file