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

    ///
    open weak var mediaDelegate: TextViewMediaDelegate?

    // MARK: - Properties: Comment Attachments

    open weak var commentsDelegate: TextViewCommentsDelegate?

    // MARK: - Properties: Formatting


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

    func storage(_ storage: TextStorage, imageFor attachment: NSTextAttachment, with size: CGSize) -> UIImage? {
        let renderer = textAttachmentRenderers.first { renderer in
            return renderer.textView(self, shouldRender: attachment)
        }

        return renderer?.textView(self, imageFor: attachment, with: size)
    }

    func storage(_ storage: TextStorage, boundsFor attachment: NSTextAttachment, with lineFragment: CGRect) -> CGRect {
        let renderer = textAttachmentRenderers.first { renderer in
            return renderer.textView(self, shouldRender: attachment)
        }

        return renderer?.textView(self, boundsFor: attachment, with: lineFragment) ?? .zero
    }
}

