fixed text formatting for selected text