diff --git a/references_dialog.dialog_widgets.inc b/references_dialog.dialog_widgets.inc
index fc913ce..5bb762a 100644
--- a/references_dialog.dialog_widgets.inc
+++ b/references_dialog.dialog_widgets.inc
@@ -50,6 +50,25 @@ function references_dialog_references_dialog_widgets() {
         ),
       ),
     ),
+    'entityreference_autocomplete' => array(
+      'element_type' => 'textfield',
+      'dialog_form' => 'entityreference_autocomplete_dialog_form',
+      'format' => '$label ($entity_id)',
+      'operations' => array(
+        'edit' => array(
+          'function' => 'references_dialog_entityreference_edit_link',
+          'title' => t('Edit dialog'),
+        ),
+        'add' => array(
+          'function' => 'references_dialog_entityreference_add_link',
+          'title' => t('Add dialog'),
+        ),
+        'search' => array(
+          'function' => 'references_dialog_get_views_search_links',
+          'title' => t('Search Dialog'),
+        ),
+      ),
+    ),
   );
 }
 
@@ -135,4 +154,79 @@ function references_dialog_user_reference_add_link($element, $widget_settings, $
     );
   }
   return $user_links;
-}
\ No newline at end of file
+}
+
+/**
+ * Edit link callback for entity references.
+ */
+function references_dialog_entityreference_edit_link($element, $widget_settings, $field, $instance) {
+  if (isset($element['#default_value'])) {
+    $entity_type = $field['settings']['target_type'];
+    // Take "label (entity id)', match the id from parenthesis.
+    if (preg_match("/.+\((\d+)\)/", $element['#default_value'], $matches)) {
+      $value = $matches[1];
+    }
+    if (isset($value)) {
+      $entity = current(entity_load($entity_type, array($value)));
+      if (entity_access('update', $entity_type, $entity)) {
+        return array(
+          array(
+            'title' => t('Edit'),
+            'href' => references_dialog_get_admin_path($entity_type, 'edit', NULL, $entity),
+          ),
+        );
+      }
+    }
+  }
+  return array();
+}
+
+/**
+ * Add link callback for entity references.
+ */
+function references_dialog_entityreference_add_link($element, $widget_settings, $field, $instance) {
+  $add_links = array();
+  $entity_type = $field['settings']['target_type'];
+  $entity_info = entity_get_info($entity_type);
+  if (!empty($field['settings']['handler_settings']['target_bundles'])) {
+    $bundles = $field['settings']['handler_settings']['target_bundles'];
+  }
+  else if (isset($entity_info['bundles'])){
+    // If the entity target bundles is empty, it means all target bundles are allowed. Fill it all up!
+    $bundles = $entity_info['bundles'];
+  }
+  // Create a link for each allowed bundle.
+  if (isset($bundles)) {
+    foreach ($bundles as $bundle => $active) {
+      if ($active !== 0) {
+        if ($link = references_dialog_entityreference_link_helper($entity_type, $bundle)) {
+          $add_links[] = $link;
+        }
+      }
+    }
+  }
+  return $add_links;
+}
+
+function references_dialog_entityreference_link_helper($entity_type, $bundle = NULL) {
+  $wrapper = entity_metadata_wrapper($entity_type, NULL, array('bundle' => $bundle));
+  $info = $wrapper->entityInfo();
+  if (isset($bundle)) {
+    $label = $info['bundles'][$bundle]['label'];
+  }
+  else {
+    $label = $info['label'];
+  }
+  // We use entity_access here. We provide the bundle if this is a node type,
+  // since node_access expects that to be passed to it as the entity when you
+  // run node_access('create')
+  if (entity_access('create', $entity_type, $entity_type == 'node' ? $bundle : NULL) &&
+    $path = references_dialog_get_admin_path($entity_type, 'add', $bundle)) {
+    $link = array(
+      'title' => t('Create @type', array('@type' => $label)),
+      'href' => $path,
+    );
+    return $link;
+  }
+  return FALSE;
+}
diff --git a/references_dialog.module b/references_dialog.module
index 0d1e79c..49a003f 100644
--- a/references_dialog.module
+++ b/references_dialog.module
@@ -455,6 +455,86 @@ function references_dialog_redirect_page($entity_id, $entity_type) {
 }
 
 /**
+ * Implements hook_references_dialog_entity_admin_paths().
+ */
+function references_dialog_references_dialog_entity_admin_paths() {
+  // We define the add and edit page callbacks for core entities here.
+  $admin_paths = array(
+    'node' => array(
+      'add' => 'node/add/[bundle-sanitized]',
+      'edit' => 'node/edit/[entity_id]',
+    ),
+    'taxonomy_term' => array(
+      'edit' => 'taxonomy/term/[entity_id]/edit',
+      'add' => 'admin/structure/taxonomy/[bundle]/add',
+    ),
+    // Dealing with taxonomy vocabularies like this is kind of silly,
+    // and accessing them is a bit harder since their admin page is accessible
+    // through their machine name, so we leave it at just adding them for now.
+    'taxonomy_vocabulary' => array(
+      'add' => 'admin/structure/taxonomy/add',
+    ),
+    'comment' => array(
+      'edit' => 'comment/[entity_id]/edit',
+    ),
+    'user' => array(
+      'add' => 'admin/people/create',
+      'edit' => 'user/[entity_id]/edit',
+    ),
+  );
+  // The media module adds an edit callback for media as well.
+  // Note: this will probably not work until file_entity provides an access
+  // API, see http://drupal.org/node/1227706
+  if (module_exists('media')) {
+    $admin_paths['file'] = array(
+      'edit' => 'media/[entity_id]/edit',
+    );
+  }
+  // The workbench media module provides a way of creating files outside of the
+  // media browser. Let's add support for that.
+  if (module_exists('workbench_media')) {
+    $admin_paths['file'] = array(
+      'add' => 'admin/workbench/media/add'
+    );
+  }
+  return $admin_paths;
+}
+
+/**
+ * Get the admin path (edit/add) page for a particular entity
+ * @param string $entity_type the entity type
+ * @param string $op Which operation to perform. Either "edit" or "add".
+ * @param string $bundle The bundle to use.
+ * @param mixed $entity The entity to edit. This is only used with the "edit" operation.
+ * @return string The path where the entity can be edited or created.
+ */
+function references_dialog_get_admin_path($entity_type, $op, $bundle = NULL, $entity = NULL) {
+  // Let's cache the paths.
+  $paths = &drupal_static(__FUNCTION__ , NULL);
+  if (!isset($paths)) {
+    $paths = module_invoke_all('references_dialog_entity_admin_paths');
+  }
+  if (isset($paths[$entity_type]) && isset($paths[$entity_type][$op])) {
+    $path = $paths[$entity_type][$op];
+    // Create a wrapper, so we can deal with this in a sane way.
+    $wrapper = entity_metadata_wrapper($entity_type, $entity);
+    // Replace [entity_id] with the entity id.
+    if (isset($entity)) {
+      $path = str_replace('[entity_id]', $wrapper->getIdentifier(), $path);
+    }
+    if (isset($bundle)) {
+      $path = str_replace('[bundle]', $bundle, $path);
+      // Some entities (like node) provide a sort of sanitized version.
+      // This makes sure we support this.
+      $bundle = strtr($bundle, array('_' => '-'));
+      $path = str_replace('[bundle-sanitized]', $bundle, $path);
+    }
+    return $path;
+  }
+  return FALSE;
+}
+
+/**
  * Theme function for theming the links for opening
  * the references dialog.
  */
