         formattingDelegate?.textViewCommandToggledAStyle()
     }
 
+
+    // MARK: - Attachment Helpers
+
+    open func registerAttachmentRenderer(_ renderer: TextViewAttachmentRenderer) {
+        textAttachmentRenderers.append(renderer)
+    }
 
     // MARK: - Getting format identifiers
 

        mediaDelegate?.textView(self, deletedAttachmentWithID: attachmentID)
    }

    func storage(_ storage: TextStorage, imageForComment attachment: CommentAttachment, with size: CGSize) -> UIImage? {
        guard let commentsDelegate = commentsDelegate else {
            fatalError("This class requires a comments delegate to be set.")
        }

        return commentsDelegate.textView(self, imageForComment: attachment, with: size)
    }

    func storage(_ storage: TextStorage, boundsForComment attachment: CommentAttachment, with lineFragment: CGRect) -> CGRect {
        guard let commentsDelegate = commentsDelegate else {
            fatalError("This class requires a comments delegate to be set.")
        }

        return commentsDelegate.textView(self, boundsForComment: attachment, with: lineFragment)
    }
}


    ///
    open weak var mediaDelegate: TextViewMediaDelegate?

    /// Maintains a reference to the user provided Text Attachment Renderers
    ///
    fileprivate var textAttachmentRenderers = [TextViewAttachmentRenderer]()

    // MARK: - Properties: Formatting

