         case .Link:
             toggleLink()
         case .Media:
-            insertImage()
+            showImagePicker()
         }
         updateFormatBar()
     }


extension EditorDemoController : Aztec.FormatBarDelegate
{

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

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


extension EditorDemoController : UIImagePickerControllerDelegate
{
    func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
        dismissViewControllerAnimated(true) { 
        }

//            NSURL *assetURL = info[UIImagePickerControllerReferenceURL];
//            [self addAssetToContent:assetURL];
//        editor.insertImage(richTextView.selectedRange.location, params: [String : AnyObject]())
    }
}


extension EditorDemoController : UINavigationControllerDelegate
{

}
