Moved rich text formatting code to a category of UITextView. Fixed media crash.