diff --git a/entity_embed.info b/entity_embed.info
index 68f611b..bcb7d8d 100644
--- a/entity_embed.info
+++ b/entity_embed.info
@@ -4,7 +4,7 @@ package = Media
 core = 7.x
 
 dependencies[] = ctools
-dependencies[] = ckeditor
+; dependencies[] = ckeditor
 dependencies[] = entity
 dependencies[] = filter
 dependencies[] = jquery_update
diff --git a/entity_embed.install b/entity_embed.install
index 49beedc..488ffbe 100644
--- a/entity_embed.install
+++ b/entity_embed.install
@@ -32,33 +32,56 @@ function entity_embed_requirements($phase) {
     }
 
     // Check if the site is running >= CKEditor 4.3.
-    if (($version = ckeditor_get_version()) && version_compare($version, 4.3, '>=')) {
+    $ckeditor_version = NULL;
+    $ckeditor_path    = NULL;
+    $ckeditor_module  = NULL;
+    if (module_exists('ckeditor')) {
+      $ckeditor_version = ckeditor_get_version();
+      $ckeditor_path    = ckeditor_path('local');
+      $ckeditor_module  = 'ckeditor';
+    }
+    if (module_exists('wysiwyg')) {
+      $ckeditor_ed      = wysiwyg_get_editor('ckeditor');
+      $ckeditor_version = $ckeditor_ed['installed version'];
+      $ckeditor_path    = $ckeditor_ed['library path'];
+      $ckeditor_module  = 'wysiwyg';
+    }
+
+    if ((!!$ckeditor_version) && version_compare($ckeditor_version, 4.3, '>=')) {
       $requirements['entity_embed_ckeditor'] = array(
         'title' => t('Entity Embed CKEditor version'),
-        'value' => t('CKEditor @version', array('@version' => $version)),
+        'value' => t('CKEditor @version', array('@version' => $ckeditor_version)),
         'severity' => REQUIREMENT_OK,
       );
     }
     else {
       $requirements['entity_embed_ckeditor'] = array(
         'title' => t('Entity Embed CKEditor version'),
-        'value' => t('CKEditor @version', array('@version' => $version)),
+        'value' => t('CKEditor @version', array('@version' => $ckeditor_version)),
         'description' => t('Entity Embed requires CKEditor 4.3 or greater. Download the latest version of <a href="@ckeditor">CKEditor</a>.', array('@ckeditor' => 'http://ckeditor.com/download')),
         'severity' => REQUIREMENT_ERROR,
       );
     }
 
-    $ckeditor_path = ckeditor_path('local');
-
     // CKEditor may either be installed locally or included via a CDN.
     if ($ckeditor_path != '<URL>') {
-      $editor_path = _ckeditor_script_path();
-
-      $editor_path = strtr($editor_path, array(
-        "%b" => ckeditor_base_path('local'),
-        "%m" => ckeditor_module_path('local'),
-        "%l" => ckeditor_library_path('local')
-      ));
+      if ($ckeditor_module == 'ckeditor') {
+        $editor_path = _ckeditor_script_path();
+        $editor_path = strtr($editor_path, array(
+          "%b" => ckeditor_base_path('local'),
+          "%m" => ckeditor_module_path('local'),
+          "%l" => ckeditor_library_path('local')
+        ));
+      }
+      else {
+        $editor_path = $ckeditor_path;
+        $ckeditor_ed = wysiwyg_get_editor('ckeditor');
+        $editor_path = strtr($editor_path, array(
+          "%b" => $ckeditor_ed['editor path'],
+          "%m" => drupal_get_path('module', 'wysiwyg'),
+          "%l" => $ckeditor_ed['library path']
+        ));
+      }
 
       $lineutils_path = $editor_path . '/plugins/lineutils';
 
diff --git a/entity_embed.module b/entity_embed.module
index 8d38357..c2f29f8 100644
--- a/entity_embed.module
+++ b/entity_embed.module
@@ -14,6 +14,11 @@ require_once dirname(__FILE__) . '/includes/entity_embed.commands.inc';
 // File usage tracking.
 require_once dirname(__FILE__) . '/includes/entity_embed.file_usage.inc';
 
+// Add WYSIWYG if that module is enabled.
+if (module_exists('wysiwyg')) {
+  require_once dirname(__FILE__) . '/entity_embed.wysiwyg.inc';  
+}
+
 /**
  * Implements hook_permission().
  */
@@ -157,10 +162,28 @@ function _entity_embed_preview_format_access($format) {
 function _entity_embed_button_is_enabled($filter_format, $embed_button) {
   module_load_include('inc', 'ckeditor', 'includes/ckeditor.lib');
   $button_label = $embed_button->name;
-  $profile = ckeditor_get_profile($filter_format->format);
+
+  $profile = NULL;
+  if (module_exists('ckeditor')) {
+    $profile = ckeditor_get_profile($filter_format->format);  
+  }
+  if (module_exists('wysiwyg')) {
+    $profile = wysiwyg_profile_load($filter_format->format);
+  }
+  if (!$profile) {
+    return FALSE;
+  }
+  
   $settings = $profile->settings;
-  if (strpos($settings['toolbar'], "'" . $button_label . "'")) {
-    return TRUE;
+  if (module_exists('ckeditor')) {
+    if (strpos($settings['toolbar'], "'" . $button_label . "'")) {
+      return TRUE;
+    }
+  }
+  if (module_exists('wysiwyg')) {
+    if (!empty($settings['toolbarLocation'])) {
+      return TRUE;
+    }
   }
 
   return FALSE;
diff --git a/entity_embed.wysiwyg.inc b/entity_embed.wysiwyg.inc
new file mode 100644
index 0000000..77ded45
--- /dev/null
+++ b/entity_embed.wysiwyg.inc
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * @file
+ * WYSIWYG integration for the entity_embed module.
+ */
+
+/**
+ * Implements hook_wysiwyg_plugin().
+ */
+function entity_embed_wysiwyg_plugin($editor, $version) {
+  $plugins = array();
+  switch ($editor) {
+    // Only do this for ckeditor
+    case 'ckeditor':
+      // Add user-defined buttons.
+      ctools_include('export');
+
+      $embed_buttons = ctools_export_crud_load_all('entity_embed');
+
+      $buttons = array();
+
+      foreach ($embed_buttons as $embed_button) {
+        $buttons[$embed_button->name] = check_plain($embed_button->button_label);
+      }
+
+      // Plugin config
+      $plugins['drupalentity'] = array(
+        'url'      => 'https://www.drupal.org/project/entity_embed',
+        'path'     => drupal_get_path('module', 'entity_embed') . '/js/plugins/drupalentity',
+        'filename' => 'plugin.js',
+        'buttons'  => $buttons,
+        'load'     => TRUE,
+        'internal' => FALSE,
+      );
+      break;
+  }
+  return $plugins;
+}
+
+/**
+ * Implement hook_wysiwyg_editor_settings_alter().
+ */
+function entity_embed_wysiwyg_editor_settings_alter(&$settings, $context) {
+  // Add theme-independent styles for aligning content.
+  $settings['contentsCss'][] = base_path() . drupal_get_path('module', 'entity_embed') . '/css/entity_embed.css';
+
+  // Add base styles for accessibility, clearing, etc.
+  $settings['contentsCss'][] = base_path() . drupal_get_path('module', 'system') . '/system.base.css';
+
+  // Add styles for handling contextual links.
+  if (module_exists('contextual')) {
+    $settings['contentsCss'][] = base_path() . drupal_get_path('module', 'contextual') . '/contextual.css';
+  }
+}
\ No newline at end of file
diff --git a/js/plugins/drupalentity/plugin.js b/js/plugins/drupalentity/plugin.js
index f6bb5e6..52b8173 100644
--- a/js/plugins/drupalentity/plugin.js
+++ b/js/plugins/drupalentity/plugin.js
@@ -25,6 +25,18 @@
         }
       }
 
+      var getEditorName = function(){
+        var editorName = null;
+        if (!!Drupal.settings.ckeditor) {
+          editorName = Drupal.settings.ckeditor.elements[editor.name];
+        }
+        if (!!Drupal.settings.wysiwyg) {
+          var wysiwygEd = Drupal.wysiwyg.valueOf();
+          editorName = wysiwygEd.instances[editor.name].format.replace(/^format/, '');
+        }
+        return editorName;
+      };
+
       // Generic command for adding/editing entities of all types.
       editor.addCommand('editdrupalentity', {
         allowedContent: 'drupal-entity[*]',
@@ -77,7 +89,8 @@
           };
 
           // Open the entity embed dialog for corresponding EmbedButton.
-          Drupal.entityEmbed.openDialog(editor, Drupal.settings.basePath + 'entity-embed/dialog/entity-embed/' + Drupal.settings.ckeditor.elements[editor.name] + '/' + embed_button_id, existingValues, saveCallback, dialogSettings);
+          var editorName = getEditorName();
+          Drupal.entityEmbed.openDialog(editor, Drupal.settings.basePath + 'entity-embed/dialog/entity-embed/' + editorName + '/' + embed_button_id, existingValues, saveCallback, dialogSettings);
         }
       });
 
@@ -107,8 +120,9 @@
           var $element = $(element.$);
           // Use the Ajax framework to fetch the HTML, so that we can retrieve
           // out-of-band assets (JS, CSS...).
+          var editorName = getEditorName();
           new Drupal.ajax($element.attr('id'), $element, {
-            url: Drupal.settings.basePath + 'entity-embed/preview/' + Drupal.settings.ckeditor.elements[editor.name] + '?' + $.param({
+            url: Drupal.settings.basePath + 'entity-embed/preview/' + editorName + '?' + $.param({
               value: element.getOuterHtml()
             }),
             progress: {type: 'none'},
