diff --git a/editors/js/markitup.js b/editors/js/markitup.js
index 00e10b9..5c9acfa 100644
--- a/editors/js/markitup.js
+++ b/editors/js/markitup.js
@@ -4,14 +4,35 @@
  * Attach this editor to a target element.
  */
 Drupal.wysiwyg.editor.attach.markitup = function(context, params, settings) {
-  $('#' + params.field, context).markItUp(settings);
+  var markupSet = [],
+      setObj = Drupal.wysiwyg.editor.markitup.sets[settings.markupSetName];
 
-  // 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.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);
+
+  if (settings.addButtonImages) {
+    // Adjust CSS for editor buttons.
+    $.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 +64,50 @@ Drupal.wysiwyg.editor.instance.markitup = {
   }
 };
 
+Drupal.wysiwyg.editor.markitup = Drupal.wysiwyg.editor.markitup || {};
+Drupal.wysiwyg.editor.markitup.sets = Drupal.wysiwyg.editor.markitup.sets || {};
+Drupal.wysiwyg.editor.markitup.sets.default = {
+  h1: {name:'Heading 1', key:'1', openWith:'<h1(!( class="[![Class]!]")!)>', closeWith:'</h1>', placeHolder:'Your title here...', className:'markitup-h1' },
+  h2: {name:'Heading 2', key:'2', openWith:'<h2(!( class="[![Class]!]")!)>', closeWith:'</h2>', placeHolder:'Your title here...', className:'markitup-h2' },
+  h3: {name:'Heading 3', key:'3', openWith:'<h3(!( class="[![Class]!]")!)>', closeWith:'</h3>', placeHolder:'Your title here...', className:'markitup-h3' },
+  h4: {name:'Heading 4', key:'4', openWith:'<h4(!( class="[![Class]!]")!)>', closeWith:'</h4>', placeHolder:'Your title here...', className:'markitup-h4' },
+  h5: {name:'Heading 5', key:'5', openWith:'<h5(!( class="[![Class]!]")!)>', closeWith:'</h5>', placeHolder:'Your title here...', className:'markitup-h5' },
+  h6: {name:'Heading 6', key:'6', openWith:'<h6(!( class="[![Class]!]")!)>', closeWith:'</h6>', placeHolder:'Your title here...', className:'markitup-h6' },
+  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-ul' },
+  ol: {name:'Numeric List', openBlockWith:'<ol>', openWith:'<li>', closeWith:'</li>', closeBlockWith:'</ol>', multiline:true, className:'markitup-ol' },
+  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-Clean' },
+  quotes: {name: 'Block quote / Inline quote', openWith:'(!(<blockquote>|!|<q>)!)', closeWith:'(!(</blockquote>|!|</q>)!)', className:'markitup-quotes' },
+  code: {name: 'Code block / Code', openWith:'(!(<pre>|!|<code>)!)', closeWith:'(!(</pre>|!|</code>)!)', className:'markitup-code' },
+  kbd: {name: 'Keyboard input', openWith:'<kbd>', closeWith:'</kbd>', className:'markitup-kbd' },
+  clean: {name:'Clean', replaceWith:function(h) { return h.selection.replace(/<(.*?)>/g, "") }, className:'markitup-preview' },
+  preview: {name:'Preview', call:'preview', className:'markitup-preview' }
+};
+
+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', replaceWith:function(h) { return h.selection.replace(/<(.*?)>/g, "") }, className:'markitup-clean' },
+  preview: {name:'Preview', call:'preview', className:'markitup-preview' }
+};
+
 })(jQuery);
diff --git a/editors/markitup.inc b/editors/markitup.inc
index faa35b4..97971f7 100644
--- a/editors/markitup.inc
+++ b/editors/markitup.inc
@@ -91,11 +91,49 @@ function wysiwyg_markitup_themes($editor, $profile) {
 }
 
 /**
+ * Implements hook_wysiwyg_markitup_markup_type_info().
+ */
+function wysiwyg_wysiwyg_markitup_markup_type_info() {
+  return array(
+    'default' => array(
+      'name' => 'HTML',
+    ),
+    'markdown' => array(
+      'name' => t('Markdown'),
+    ),
+  );
+}
+
+/**
  * 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 markup types.
+  $markup_types = module_invoke_all('wysiwyg_markitup_markup_type_info');
+  $options = array();
+  foreach ($markup_types as $machine_name => $info) {
+    $options[$machine_name] = $info['name'];
+  }
+
+  $form['output']['markup_type'] = array(
+    '#type' => 'select',
+    '#title' => t('Markup type'),
+    '#default_value' => $settings['markup_type'],
+    '#options' => $options,
+  );
+
+  $form['output']['add_button_images'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Add images for buttons'),
+    '#description' => t('By default wysiwyg adds the button images as styles on the button element. This makes it difficult to theme as different buttons. Uncheck this box to remove those styles.'),
+    '#default_value' => isset($settings['add_button_images']) ? $settings['add_button_images'] : TRUE,
+  );
 }
 
 /**
@@ -123,84 +161,118 @@ 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['markup_type']) ? $config['markup_type'] : 'default',
+    'addButtonImages' => isset($config['add_button_images']) ? $config['add_button_images'] : FALSE,
   );
 
-  // Add configured buttons or all available.
-  $default_buttons = array(
+  $default_buttons = _wysiwyg_markitup_default_buttons();
+
+  if (!empty($config['buttons'])) {
+    foreach ($config['buttons'] as $plugin) {
+      foreach ($plugin as $button => $enabled) {
+        if (isset($default_buttons[$button])) {
+          $group = !empty($default_buttons[$button]['group']) ? $default_buttons[$button]['group'] : 'other';
+          $settings['buttons'][$group][$button] = $default_buttons[$button];
+        }
+      }
+    }
+  }
+ return $settings;
+}
+
+/**
+ * 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' => $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'),
-      'className' => 'markitup-bold',
-      'key' => 'B',
-      'openWith' => '(!(<strong>|!|<b>)!)',
-      'closeWith' => '(!(</strong>|!|</b>)!)',
+      'group' => 'basicstyles',
     ),
     'italic' => array(
       'name' => t('Italic'),
-      'className' => 'markitup-italic',
-      'key' => 'I',
-      'openWith' => '(!(<em>|!|<i>)!)',
-      'closeWith' => '(!(</em>|!|</i>)!)',
+      'group' => 'basicstyles',
     ),
     'stroke' => array(
       'name' => t('Strike-through'),
-      'className' => 'markitup-stroke',
-      'key' => 'S',
-      'openWith' => '<del>',
-      'closeWith' => '</del>',
+      'group' => 'basicstyles',
+    ),
+    'ul' => array(
+      'name' => t('Bullet list'),
+      'group' => 'paragraph',
+    ),
+    'ol' => array(
+      'name' => t('Numeric list'),
+      'group' => 'paragraph',
     ),
     'image' => array(
       'name' => t('Image'),
-      'className' => 'markitup-image',
-      'key' => 'P',
-      'replaceWith' => '<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />',
+      'group' => 'insert',
     ),
     '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, "") }'),
+      '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',
+    ),
+    'cleanup' => array(
+      'name' => t('Clean-up'),
+    ),
     'preview' => array(
       'name' => t('Preview'),
-      'className' => 'markitup-preview',
-      'call' => 'preview',
     ),
   );
-  $settings['markupSet'] = array();
-  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];
-        }
-      }
-    }
-  }
-
-  return $settings;
 }
-
-/**
- * Return internal plugins for this editor; semi-implementation of hook_wysiwyg_plugin().
- */
-function wysiwyg_markitup_plugins($editor) {
-  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'),
-      ),
-      'internal' => TRUE,
-    ),
-  );
-}
-
