Added functionality for parseFormattedText