         addMentionOnReturnKey: Bool,
         trigger: String,
         cooldownInterval: TimeInterval) {
-            self.mentionsTextView = mentionTextView
-            self.mentionsManager = mentionsManager
-            self.delegate = textViewDelegate
-            self.spaceAfterMention = spaceAfterMention
-            self.addMentionAfterReturnKey = addMentionOnReturnKey
-            if (defaultTextAttributes != nil) {
-                self.defaultTextAttributes = defaultTextAttributes!
-            }
-            if (mentionTextAttributes != nil) {
-                self.mentionTextAttributes = mentionTextAttributes!
-            }
-            self.trigger = trigger;
-            self.cooldownInterval = cooldownInterval
-            super.init()
-            assert(attributesSetCorrectly(self.mentionTextAttributes,
-                defaultAttributes: self.defaultTextAttributes),
-                attributeConsistencyError)
-            resetEmpty(self.mentionsTextView)
-            self.mentionsTextView.delegate = self
+        self.mentionsTextView = mentionTextView
+        self.mentionsManager = mentionsManager
+        self.delegate = textViewDelegate
+        self.spaceAfterMention = spaceAfterMention
+        self.addMentionAfterReturnKey = addMentionOnReturnKey
+        if (defaultTextAttributes != nil) {
+            self.defaultTextAttributes = defaultTextAttributes!
+        }
+        if (mentionTextAttributes != nil) {
+            self.mentionTextAttributes = mentionTextAttributes!
+        }
+        self.trigger = trigger;
+        self.cooldownInterval = cooldownInterval
+        super.init()
+        assert(attributesSetCorrectly(self.mentionTextAttributes,
+                                      defaultAttributes: self.defaultTextAttributes),
+               attributeConsistencyError)
+        resetEmpty(self.mentionsTextView)
+        self.mentionsTextView.delegate = self
     }
 
     // MARK: Attribute assert

    open func textView(
        _ textView: UITextView,
        shouldInteractWith textAttachment: NSTextAttachment,
                                         in characterRange: NSRange) -> Bool {

        self.delegate?.textView?(
            textView,
            shouldInteractWith: textAttachment,
            in: characterRange)

            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
