Added text and markdown mode enhancements