         let attachmentString = NSAttributedString(attachment: attachment, attributes: typingAttributes)        
         storage.replaceCharacters(in: range, with: attachmentString)
         selectedRange = NSMakeRange(range.location + NSAttributedString.lengthOfTextAttachment, 0)
-        delegate?.textViewDidChange?(self)
+        textViewDidChange()
     }
 
     /// Replaces with an image attachment at the specified range

        string.loadLazyAttachments()

        storage.replaceCharacters(in: selectedRange, with: string)
        delegate?.textViewDidChange?(self)
        selectedRange = NSRange(location: selectedRange.location + string.length, length: 0)
    }


            let location = max(0,min(selectedRange.location, textStorage.length-1))
            typingAttributes = textStorage.attributes(at: location, effectiveRange: nil)
        }
        textViewDidChange()
    }

    /// Adds or removes a bold style from the specified range.
