diff --git a/editors/js/markitup.default.js b/editors/js/markitup.default.js
new file mode 100644
index 0000000..f18de23
--- /dev/null
+++ b/editors/js/markitup.default.js
@@ -0,0 +1,11 @@
+Drupal.wysiwyg.editor.markitup.sets.default = {
+  bold: {name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)', className:'markitup-bold' },
+  italic: {name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)', className:'markitup-italic' },
+  stroke: {name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>', className:'markitup-stroke' },
+  ul: {name:'Bulleted List', openBlockWith:'<ul>', openWith:'<li>', closeWith:'</li>', closeBlockWith:'</ul>', multiline:true, className:'markitup-list-bullet' },
+  ol: {name:'Numeric List', openBlockWith:'<ol>', openWith:'<li>', closeWith:'</li>', closeBlockWith:'</ol>', multiline:true, className:'markitup-list-numeric' },
+  image: {name:'Image', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />', className:'markitup-image' },
+  link: {name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...', className:'markitup-link' },
+  clean: {name:'Clean-up', replaceWith:function(h) { return h.selection.replace(/<(.*?)>/g, "") }, className:'markitup-clean' },
+  preview: {name:'Preview', call:'preview', className:'markitup-preview' }
+};
diff --git a/editors/js/markitup.js b/editors/js/markitup.js
index 00e10b9..4211415 100644
--- a/editors/js/markitup.js
+++ b/editors/js/markitup.js
@@ -4,13 +4,44 @@
  * Attach this editor to a target element.
  */
 Drupal.wysiwyg.editor.attach.markitup = function(context, params, settings) {
+  var markupSet = [],
+      setObj = Drupal.wysiwyg.editor.markitup.sets[settings.markupSetName];
+
+  // If there is something set in all then add it to the list of buttons.
+  if (!$.isEmptyObject(Drupal.wysiwyg.editor.markitup.sets.all)) {
+    for (button in Drupal.wysiwyg.editor.markitup.sets.all) {
+      // First make sure this isn't already defined more explicitly. This let's
+      // a plugin set a default by using all but override it for each set.
+      if (typeof setObj[button] === 'undefined') {
+        setObj[button] = Drupal.wysiwyg.editor.markitup.sets.all[button];
+      }
+    }
+  }
+
+  // Build the button layout.
+  $.each(settings.buttons, function(group, buttons) {
+    $.each(buttons, function(button, options) {
+      var buttonValue = $.extend(setObj[button], options);
+      markupSet.push(buttonValue);
+    });
+    markupSet.push({separator:'---------------', className:'markitup-separator' });
+  });
+
+  // Remove the last separator
+  markupSet.pop();
+  settings.markupSet = markupSet;
+
   $('#' + params.field, context).markItUp(settings);

   // Adjust CSS for editor buttons.
-  $.each(settings.markupSet, function (button) {
-    $('.' + settings.nameSpace + ' .' + this.className + ' a')
-      .css({ backgroundImage: 'url(' + settings.root + 'sets/default/images/' + button + '.png' + ')' })
-      .parents('li').css({ backgroundImage: 'none' });
+  $.each(settings.markupSet, function (index, button) {
+    // Get button from class name, for example: markitup-h1
+    var name = button.className.substr(9);
+    if (name != 'separator') {
+      $('.' + settings.nameSpace + ' .' + this.className + ' a')
+        .css({ backgroundImage: 'url(' + settings.root + 'sets/' + settings.markupSetName + '/images/' + name + '.png' + ')' })
+        .parents('li').css({ backgroundImage: 'none' });
+    }
   });
 };

@@ -43,4 +74,9 @@ Drupal.wysiwyg.editor.instance.markitup = {
   }
 };

+// Set default object variables so other modules can add their own sets.
+Drupal.wysiwyg.editor.markitup = Drupal.wysiwyg.editor.markitup || {};
+Drupal.wysiwyg.editor.markitup.sets = Drupal.wysiwyg.editor.markitup.sets || {};
+Drupal.wysiwyg.editor.markitup.sets.all = Drupal.wysiwyg.editor.markitup.sets.all || {};
+
 })(jQuery);
diff --git a/editors/js/markitup.markdown.js b/editors/js/markitup.markdown.js
new file mode 100644
index 0000000..4f452a7
--- /dev/null
+++ b/editors/js/markitup.markdown.js
@@ -0,0 +1,22 @@
+Drupal.wysiwyg.editor.markitup.sets.markdown = {
+  h1: {name:'Heading 1', key:'1', openWith:'# ', placeHolder:'Your title here...', className:'markitup-h1' },
+  h2: {name:'Heading 2', key:'2', openWith:'## ', placeHolder:'Your title here...', className:'markitup-h2' },
+  h3: {name:'Heading 3', key:'3', openWith:'### ', placeHolder:'Your title here...', className:'markitup-h3' },
+  h4: {name:'Heading 4', key:'4', openWith:'#### ', placeHolder:'Your title here...', className:'markitup-h4' },
+  h5: {name:'Heading 5', key:'5', openWith:'##### ', placeHolder:'Your title here...', className:'markitup-h5' },
+  h6: {name:'Heading 6', key:'6', openWith:'###### ', placeHolder:'Your title here...', className:'markitup-h6' },
+  bold: {name:'Bold', key:'B', openWith:'(!(**|!|__)!)', closeWith:'(!(**|!|__)!)', className:'markitup-bold' },
+  italic: {name:'Italic', key:'I', openWith:'(!(*|!|_)!)', closeWith:'(!(*|!|_)!)', className:'markitup-italic'},
+  stroke: {name:'Stroke through', key:'S', openWith:'~~', closeWith:'~~', className:'markitup-stroke' },
+  ul: {name:'Bulleted List', openWith:'- ', multiline:true, className:'markitup-list-bullet' },
+  ol: {name:'Numeric List', openWith: function(markItUp) {
+    return markItUp.line+'. ';
+  }, multiline:true, className:'markitup-list-numeric'},
+  image: {name:'Image', key:'P', replaceWith:'![[![Alternative text]!]]([![Url:!:http://]!] "[![Title]!]")', className:'markitup-image' },
+  link: {name:'Link', key:'L', openWith:'[', closeWith:']([![Url:!:http://]!] "[![Title]!]")', placeHolder:'Your text to link...', className:'markitup-link' },
+  code: {name: 'Code block / Code', openWith:'(!(    |!|`)!)', closeWith:'(!(|!|`)!)', multiline:true, className:'markitup-code' },
+  kbd: {name: 'Keyboard input', openWith:'<kbd>', closeWith:'</kbd>', className:'markitup-kbd' },
+  quotes: {name: 'Quotes', openWith:'> ', className:'markitup-quotes' },
+  clean: {name:'Clean-up', replaceWith:function(h) { return h.selection.replace(/<(.*?)>/g, "") }, className:'markitup-clean' },
+  preview: {name:'Preview', call:'preview', className:'markitup-preview' }
+};
diff --git a/editors/markitup.inc b/editors/markitup.inc
index faa35b4..5f1191a 100644
--- a/editors/markitup.inc
+++ b/editors/markitup.inc
@@ -91,11 +91,112 @@ function wysiwyg_markitup_themes($editor, $profile) {
 }

 /**
+ * Implements hook_wysiwyg_markitup_sets_info().
+ */
+function wysiwyg_wysiwyg_markitup_sets_info() {
+  return array(
+    'default' => array(
+      'name' => 'Default',
+      'supported_buttons' => array(
+        'bold',
+        'italic',
+        'stroke',
+        'image',
+        'link',
+        'ul',
+        'ol',
+        'clean',
+        'preview',
+      ),
+      'js' => array(
+        drupal_get_path('module', 'wysiwyg') . '/editors/js/markitup.default.js',
+      ),
+    ),
+    'markdown' => array(
+      'name' => t('Markdown'),
+      'supported_buttons' => array(
+        'h1',
+        'h2',
+        'h3',
+        'h4',
+        'h5',
+        'h6',
+        'bold',
+        'italic',
+        'stroke',
+        'image',
+        'link',
+        'ul',
+        'ol',
+        'quotes',
+        'code',
+        'kbd',
+        'clean',
+        'preview',
+      ),
+      'js' => array(
+        drupal_get_path('module', 'wysiwyg') . '/editors/js/markitup.markdown.js',
+      ),
+    ),
+  );
+}
+
+/**
  * Enhances the editor profile settings form for markItUp.
  */
 function wysiwyg_markitup_settings_form(&$form, &$form_state) {
+  $profile = $form_state['wysiwyg_profile'];
+  $settings = $profile->settings;
+
   $form['basic']['language']['#access'] = FALSE;
   $form['css']['#access'] = FALSE;
+
+  // Get the available sets.
+  $sets = module_invoke_all('wysiwyg_markitup_sets_info');
+
+  // Pull in the default buttons.
+  $default_buttons = _wysiwyg_markitup_default_buttons();
+
+  $options = array();
+  $states = array();
+
+  // Find which of the default buttons are unsupported.
+  foreach ($sets as $machine_name => $info) {
+    $options[$machine_name] = $info['name'];
+    if (!empty($info['supported_buttons'])) {
+      $supported_buttons = array_flip($info['supported_buttons']);
+      $unsupported_buttons = array_diff_key($default_buttons, $supported_buttons);
+
+      foreach ($unsupported_buttons as $button_name => $button_info) {
+        $states[$button_name][] = $machine_name;
+      }
+    }
+  }
+
+  // Create disabled states for each checkbox that isn't supported.
+  foreach ($states as $button_name => $types) {
+    if (count($types) === 1) {
+      $state_options = array('value' => $types[0]);
+    }
+    else {
+      $state_options = array();
+      foreach ($types as $type) {
+        $state_options[] = array(
+          'value' => $type,
+        );
+      }
+    }
+
+    $form['buttons']['default'][$button_name]['#states']['disabled'][':input[name="set"]'] = $state_options;
+  }
+
+  $form['output']['set'] = array(
+    '#type' => 'select',
+    '#title' => t('Set'),
+    '#description' => t('Sets are different markup types that are available in markitup.'),
+    '#default_value' => !empty($settings['set'])? $settings['set'] : NULL,
+    '#options' => $options,
+  );
 }

 /**
@@ -123,60 +224,43 @@ function wysiwyg_markitup_settings($editor, $config, $theme) {
   $settings = array(
     'root' => base_path() . $editor['library path'] . '/markitup/',
     'nameSpace' => $theme,
-    'markupSet' => array(),
+    'buttons' => array(),
+    'markupSetName' => isset($config['set']) ? $config['set'] : 'default',
   );

-  // Add configured buttons or all available.
-  $default_buttons = array(
-    'bold' => array(
-      'name' => t('Bold'),
-      'className' => 'markitup-bold',
-      'key' => 'B',
-      'openWith' => '(!(<strong>|!|<b>)!)',
-      'closeWith' => '(!(</strong>|!|</b>)!)',
-    ),
-    'italic' => array(
-      'name' => t('Italic'),
-      'className' => 'markitup-italic',
-      'key' => 'I',
-      'openWith' => '(!(<em>|!|<i>)!)',
-      'closeWith' => '(!(</em>|!|</i>)!)',
-    ),
-    'stroke' => array(
-      'name' => t('Strike-through'),
-      'className' => 'markitup-stroke',
-      'key' => 'S',
-      'openWith' => '<del>',
-      'closeWith' => '</del>',
-    ),
-    'image' => array(
-      'name' => t('Image'),
-      'className' => 'markitup-image',
-      'key' => 'P',
-      'replaceWith' => '<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />',
-    ),
-    'link' => array(
-      'name' => t('Link'),
-      'className' => 'markitup-link',
-      'key' => 'K',
-      'openWith' => '<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>',
-      'closeWith' => '</a>',
-      'placeHolder' => 'Your text to link...',
-    ),
-    // @todo
-    // 'cleanup' => array('name' => t('Clean-up'), 'className' => 'markitup-cleanup', 'replaceWith' => 'function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") }'),
-    'preview' => array(
-      'name' => t('Preview'),
-      'className' => 'markitup-preview',
-      'call' => 'preview',
-    ),
-  );
-  $settings['markupSet'] = array();
+  // Get the available sets.
+  $sets = module_invoke_all('wysiwyg_markitup_sets_info');
+  $set = $sets[$settings['markupSetName']];
+
+  // Add set scripts.
+  if (!empty($set['js'])) {
+    foreach ($set['js'] as $script) {
+      drupal_add_js($script);
+    }
+  }
+
+  // Add set stylesheets.
+  if (!empty($set['css'])) {
+    foreach ($set['css'] as $stylesheet) {
+      drupal_add_css($stylesheet);
+    }
+  }
+
+  $buttons = _wysiwyg_markitup_default_buttons();
+
+  // Only need the buttons the set supports.
+  if (!empty($set['supported_buttons'])) {
+    $supported_buttons = array_flip($set['supported_buttons']);
+    $buttons = array_intersect_key($buttons, $supported_buttons);
+  }
+
+  // Put the buttons into groups and add it to the settings.
   if (!empty($config['buttons'])) {
     foreach ($config['buttons'] as $plugin) {
       foreach ($plugin as $button => $enabled) {
-        if (isset($default_buttons[$button])) {
-          $settings['markupSet'][$button] = $default_buttons[$button];
+        if (isset($buttons[$button])) {
+          $group = !empty($buttons[$button]['group']) ? $buttons[$button]['group'] : 'other';
+          $settings['buttons'][$group][$button] = $buttons[$button];
         }
       }
     }
@@ -189,18 +273,98 @@ function wysiwyg_markitup_settings($editor, $config, $theme) {
  * Return internal plugins for this editor; semi-implementation of hook_wysiwyg_plugin().
  */
 function wysiwyg_markitup_plugins($editor) {
+  $default_buttons = _wysiwyg_markitup_default_buttons();
+  $buttons = array();
+  foreach ($default_buttons as $button => $info) {
+    $buttons[$button] = $info['name'];
+  }
+
   return array(
     'default' => array(
-      'buttons' => array(
-        'bold' => t('Bold'), 'italic' => t('Italic'),
-        'stroke' => t('Strike-through'),
-        'link' => t('Link'),
-        'image' => t('Image'),
-        // 'cleanup' => t('Clean-up'),
-        'preview' => t('Preview'),
-      ),
+      'buttons' => $buttons,
       'internal' => TRUE,
     ),
   );
 }

+/**
+ * Define the default buttons.
+ */
+function _wysiwyg_markitup_default_buttons() {
+  return array(
+    'h1' => array(
+      'name' => t('Heading 1'),
+      'group' => 'heading',
+    ),
+    'h2' => array(
+      'name' => t('Heading 2'),
+      'group' => 'heading',
+    ),
+    'h3' => array(
+      'name' => t('Heading 3'),
+      'group' => 'heading',
+    ),
+    'h4' => array(
+      'name' => t('Heading 4'),
+      'group' => 'heading',
+    ),
+    'h5' => array(
+      'name' => t('Heading 5'),
+      'group' => 'heading',
+    ),
+    'h6' => array(
+      'name' => t('Heading 6'),
+      'group' => 'heading',
+    ),
+    'bold' => array(
+      'name' => t('Bold'),
+      'group' => 'basicstyles',
+    ),
+    'italic' => array(
+      'name' => t('Italic'),
+      'group' => 'basicstyles',
+    ),
+    'underline' => array(
+      'name' => t('Underline'),
+      'group' => 'basicstyles',
+    ),
+    'stroke' => array(
+      'name' => t('Strike-through'),
+      'group' => 'basicstyles',
+    ),
+    'ul' => array(
+      'name' => t('Bullet list'),
+      'group' => 'paragraph',
+    ),
+    'ol' => array(
+      'name' => t('Numeric list'),
+      'group' => 'paragraph',
+    ),
+    'image' => array(
+      'name' => t('Image'),
+      'group' => 'insert',
+    ),
+    'link' => array(
+      'name' => t('Link'),
+      'group' => 'insert',
+    ),
+    'quotes' => array(
+      'name' => t('Quotes'),
+      'group' => 'tools',
+    ),
+    'code' => array(
+      'name' => t('Code Block / Code'),
+      'group' => 'tools',
+    ),
+    'kbd' => array(
+      'name' => t('Keyboard Input'),
+      'group' => 'tools',
+    ),
+    'clean' => array(
+      'name' => t('Clean-up'),
+    ),
+    'preview' => array(
+      'name' => t('Preview'),
+    ),
+  );
+}
diff --git a/wysiwyg.api.php b/wysiwyg.api.php
index 06b3808..620c8af 100644
--- a/wysiwyg.api.php
+++ b/wysiwyg.api.php
@@ -287,3 +287,45 @@ function hook_wysiwyg_editor_settings_alter(&$settings, $context) {
     $settings['stylesheetParser_skipSelectors'] = wysiwyg_wrap_js_regexp('(^body\.|^caption\.|\.high|^\.)', 'i');
   }
 }
+
+/**
+ *  Return an array of markitup sets.
+ *
+ * These are usually found as sets on the markitup website.
+ *
+ * @return
+ *   An associative array having set names as keys and an array of set
+ *   meta-information as values.
+ *
+ *   - name: Display name of the markup type.
+ *   - supported buttons: Which of the default buttons found in
+ *       _wysiwyg_markitup_default_buttons does the type support.
+ *   - js: Javascript to add when showing this type.
+ *   - css: CSS to add when showing this type.
+ */
+function hook_wysiwyg_markitup_sets_info() {
+  return array(
+    'bbcode' => array(
+      'name' => t('BBCode'),
+      'supported_buttons' => array(
+        'bold',
+        'italic',
+        'underline',
+        'image',
+        'link',
+        'ul',
+        'ol',
+        'code',
+        'quotes',
+        'cleanup',
+        'preview',
+      ),
+      'js' => array(
+        drupal_get_path('module', 'module_name') . '/script.js',
+      ),
+      'css' => array(
+        drupal_get_path('module', 'module_name') . '/style.css',
+      ),
+    ),
+  );
+}
