         let mutableEncodedString = NSMutableAttributedString(attributedString: user.encodedAttributedString())
         mutableEncodedString.addAttributes([NSFontAttributeName : font, NSForegroundColorAttributeName : MentionColor], range: NSRange(location: 0, length: mutableEncodedString.length))
         text.replaceCharactersInRange(mentionRange!, withAttributedString: mutableEncodedString)
+        let typingAttributes = view?.m_typingAttributes
         setAttributedText(text, cursorLocation: mentionRange!.location + mutableEncodedString.length)
+        view?.m_typingAttributes = typingAttributes
         delegate?.userDidComposeMention?()
     }
 


public protocol ComposableAttributedTextContainingView: AttributedTextContainingView, UITextInputTraits, UITextInput {
    var m_autoCorrectionType: UITextAutocorrectionType { get set }
}

public var MentionCharacter: Character = "@"

            return autocorrectionType
        }
        set {
            autocorrectionType = newValue
        }
    }

    public var m_typingAttributes: [String : AnyObject]? {
        get {
            return typingAttributes
        }
        set {
            typingAttributes = newValue!
        }
    }
}
