             self.delegate?.textViewDidChangeSelection?(textView)
         }
     }
-
+    
     open func textViewDidEndEditing(_ textView: UITextView) {
         self.delegate?.textViewDidEndEditing?(textView)
     }
-
+    
     open func textViewShouldBeginEditing(_ textView: UITextView) -> Bool {
         if let shouldBeginEditing = self.delegate?.textViewShouldBeginEditing?(textView) {
             return shouldBeginEditing

     @param text: text to replace range
     */
    fileprivate func handleEditingMention(_ mention: SZMention, textView: UITextView,
                                      range: NSRange, text: String) -> Bool {
        let mutableAttributedString = textView.attributedText.mutableCopy()

        SZAttributedStringHelper.apply(

                mentionEnabled = textBeforeTrigger == " " || textBeforeTrigger == "\n"
            }
        }

        if mentionEnabled {
            if let stringBeingTyped = substring.components(separatedBy: textBeforeTrigger).last {
                if let stringForMention = stringBeingTyped.components(separatedBy: " ").last {
