     /// AztecTextAttachments found in textStorage and asks the delegate for a
     /// custom view for the attachment.
     ///
-    private func enumerateAttachments() {
+    private func reloadAttachments() {
         resetAttachmentManager()
 
+        enumerateAttachments(ofType: AztecTextAttachment.self) { (attachment, range) in
+            self.attachments.append(attachment)
+
+            guard let view = self.delegate?.attachmentManager(self, viewForAttachment: attachment) else {
+                return
+            }
+
+            self.attachmentViews[attachment.identifier] = AztecAttachmentView(view: view, identifier: attachment.identifier, exclusionPath: nil)
+            self.resizeViewForAttachment(attachment, toFitInContainer: self.textView.textContainer)
+            self.textView.addSubview(view)
+        }
+
+        layoutAttachmentViews()
+    }
+
+
+    /// Enumerates all of the available NSTextAttachment's of the specified kind, in a given range.
+    /// For each one of those elements, the specified block will be called.
+    ///
+    /// - Parameters:
+    ///     - range: The range that should be checked. Nil wil cause the whole text to be scanned
+    ///     - type: The kind of Attachment we're after
+    ///     - block: Closure to be executed, for each one of the elements
+    ///
+    private func enumerateAttachments<T : NSTextAttachment>(range: NSRange? = nil, ofType type: T.Type, block: ((T, NSRange) -> Void)) {
         guard let textStorage = layoutManager.textStorage else {
             assertionFailure("Unable to enumerate attachments. No NSTextStorage.")
             return
         }
 
-        let range = NSMakeRange(0, textStorage.length)
+        let range = range ?? NSMakeRange(0, textStorage.length)
         textStorage.enumerateAttribute(NSAttachmentAttributeName, inRange: range, options: []) { (object, range, stop) in
-            guard let attachment = object as? AztecTextAttachment else {
-                return
+            if let object = object as? T {
+                block(object, range)
             }
-
-            self.attachments.append(attachment)
-
-            guard let view = self.delegate?.attachmentManager(self, viewForAttachment: attachment) else {
-                return
-            }
-
-            self.attachmentViews[attachment.identifier] = AztecAttachmentView(view: view, identifier: attachment.identifier, exclusionPath: nil)
-            self.resizeViewForAttachment(attachment, toFitInContainer: self.textView.textContainer)
-            self.textView.addSubview(view)
-        }
-
-        layoutAttachmentViews()
+        }
     }
 
 

    /// or from `NSLayoutManagerDelegate.layoutManager(layoutManager, textContainer, didChangeGeometryFromSize oldSize)`
    ///
    public func resizeAttachments() {
        guard let textStorage = layoutManager.textStorage else {
            return
        }

        let textContainer = textView.textContainer
        let range = NSMakeRange(0, textStorage.length)

        textStorage.enumerateAttribute(NSAttachmentAttributeName, inRange: range, options: []) { (object, range, stop) in
            guard let attachment = object as? AztecTextAttachment else {
                return
            }

            self.resizeViewForAttachment(attachment, toFitInContainer: textContainer)
        }


    /// whenever the text in the textView changes.
    ///
    public func updateAttachmentLayout() {
        reloadAttachments()
    }


