             }
         }
     }
-    
+
     func scrollViewDidZoom(_ scrollView: UIScrollView) {
         if originalDelegate?.responds(to: #function) ?? false {
             originalDelegate!.scrollViewDidZoom!(scrollView)

        }
        return superReturnValue
    }
    
    override func paste(_ sender: Any?) {
        var shouldCallSuper = true
        if let pasteBlock = self.pasteBlock {

            super.paste(sender)
        }
    }

    // MARK: - QMUITextViewDelegate

    func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
        if debug {
            print("textView.text(\(textView.text.length) | \(textView.text.qmui_lengthWhenCountingNonASCIICharacterAsTwo) = \(textView.text)\nmarkedTextRange = \(String(describing: textView.markedTextRange))\nrange = \(NSStringFromRange(range))\ntext = \(text)")
        }

        if text.isEqual("\n") && delegate?.responds(to: #selector(QMUITextViewDelegate.textViewShouldReturn(_:))) ?? false {
            let shouldReturn = (delegate as? QMUITextViewDelegate)?.textViewShouldReturn!(self) ?? false
            if shouldReturn {
                return false
            }
        }

        if let textView = textView as? QMUITextView {
            if textView.maximumTextLength < Int.max {
                // 如果是中文输入法正在输入拼音的过程中（markedTextRange 不为 nil），是不应该限制字数的（例如输入“huang”这5个字符，其实只是为了输入“黄”这一个字符），所以在 shouldChange 这里不会限制，而是放在 didChange 那里限制。
                let isDeleting = range.length > 0 && text.length <= 0
                if isDeleting || (textView.markedTextRange != nil) {
                    if textView.originalDelegate?.responds(to: #function) ?? false {
                        return textView.originalDelegate!.textView!(textView, shouldChangeTextIn: range, replacementText: text)
                    }

                    return true
                }

                let valueIfTrue = textView.text.substring(with: range).qmui_lengthWhenCountingNonASCIICharacterAsTwo
                let rangeLength = UInt(shouldCountingNonASCIICharacterAsTwo ? valueIfTrue : range.length)
                let textWillOutofMaximumTextLength = lengthWithString(textView.text) - rangeLength + lengthWithString(text) > textView.maximumTextLength
