 
         attachmentManager = AztecAttachmentManager(textView: textView, delegate: self)
         textView.layoutManager.delegate = self
+    }
+
+
+    // MARK: - Misc helpers
+
+
+    /// Get the default paragraph style for the editor.
+    ///
+    /// - Returns: The default paragraph style.
+    ///
+    func defaultParagraphStyle() -> NSParagraphStyle {
+        // TODO: We need to implement this properly, Just stubbed for now.
+        return NSParagraphStyle()
+    }
+
+
+    /// Get the ranges of paragraphs that encompase the specified range.
+    ///
+    /// - Paramaters:
+    ///     - range: The specified NSRange.
+    ///
+    /// - Returns an array of NSRange objects.
+    ///
+    func rangesOfParagraphsEnclosingRange(range: NSRange) -> [NSRange] {
+        var paragraphRanges = [NSRange]()
+        let string = storage.string as NSString
+        string.enumerateSubstringsInRange(NSRange(location: 0, length: string.length),
+                                          options: .ByParagraphs,
+                                          usingBlock: { (substring, substringRange, enclosingRange, stop) in
+                                            // Stop if necessary.
+                                            if substringRange.location > NSMaxRange(range) {
+                                                stop.memory = true
+                                                return
+                                            }
+
+                                            // Bail early if the paragraph precedes the start of the selection
+                                            if NSMaxRange(substringRange) < range.location {
+                                                return
+                                            }
+
+                                            paragraphRanges.append(substringRange)
+        })
+        return paragraphRanges
     }
 
 

    }


    /// Adds or removes a bold style from the specified range.
    ///
    /// - Paramters:
    ///     - range: The NSRange to edit.
    ///
    public func toggleBlockquote(range range: NSRange) {
        print("quote")
    }



        }
        return false
    }


    /// Check if the strikethrough attribute exists at the specified index.
    ///
    /// - Paramters:
    ///     - index: The character index to inspect.
    ///
    /// - Returns: True if the attribute exists at the specified index.
    ///
    public func formattingAtIndexContainsBlockquote(index: Int) -> Bool {
        guard let attr = storage.attribute(NSParagraphStyleAttributeName, atIndex: index, effectiveRange: nil) as? NSParagraphStyle else {
            return false
        }

        // TODO: This is very basic. We'll want to check for our custom blockquote attribute eventually.
        return attr.headIndent != 0
    }


}

