     }
 
 
-    func insertImage() {
-        editor.insertImage(richTextView.selectedRange.location, params: [String : AnyObject]())
+    func showImagePicker() {
+        let picker = UIImagePickerController()
+        picker.sourceType = .PhotoLibrary
+        picker.mediaTypes = UIImagePickerController.availableMediaTypesForSourceType(.PhotoLibrary) ?? []
+        picker.delegate = self
+        picker.allowsEditing = false
+        picker.navigationBar.translucent = false
+        picker.modalPresentationStyle = .CurrentContext
+
+        presentViewController(picker, animated: true, completion: nil)
     }
 
     // MARK: -

    func templateImage(named named: String) -> UIImage {
        return UIImage(named: named)!.imageWithRenderingMode(.AlwaysTemplate)
    }

}


extension EditorDemoController : Aztec.FormatBarDelegate
{
    func handleActionForIdentifier(identifier: String) {
        guard let identifier = Aztec.FormattingIdentifier(rawValue: identifier) else {
            return
