diff --git a/editors/js/markitup.js b/editors/js/markitup.js
index 00e10b9..b909251 100644
--- a/editors/js/markitup.js
+++ b/editors/js/markitup.js
@@ -4,13 +4,32 @@
  * 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];
+
+  $.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 +62,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:'First Level Heading', key:'1', openWith:'# ', placeHolder:'Your title here...', className:'markitup-h1' },
+  h2: {name:'First Leve2 Heading', 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..29c83af 100644
--- a/editors/markitup.inc
+++ b/editors/markitup.inc
@@ -94,8 +94,18 @@ function wysiwyg_markitup_themes($editor, $profile) {
  * 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;
+
+  $form['output']['markup_type'] = array(
+    '#type' => 'select',
+    '#title' => t('Markup type'),
+    '#default_value' => $settings['markup_type'],
+    '#options' => array('default' => 'HTML', 'markdown' => t('Markdown')),
+  );
 }
 
 /**
@@ -123,66 +133,77 @@ function wysiwyg_markitup_settings($editor, $config, $theme) {
   $settings = array(
     'root' => base_path() . $editor['library path'] . '/markitup/',
     'nameSpace' => $theme,
-    'markupSet' => array(),
+    'buttons' => array(),
+    'markupSetName' => $config['markup_type'] ? $config['markup_type'] : 'default',
   );
 
-  // Add configured buttons or all available.
   $default_buttons = array(
+    'h1' => array(
+      'name' => t('First Level Heading'),
+    ),
+    'h2' => array(
+      'name' => t('Second Level Heading'),
+    ),
+    'h3' => array(
+      'name' => t('Heading 3'),
+    ),
+    'h4' => array(
+      'name' => t('Heading 4'),
+    ),
+    'h5' => array(
+      'name' => t('Heading 5'),
+    ),
+    'h6' => array(
+      'name' => t('Heading 6'),
+    ),
     '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>',
+    ),
+    'ul' => array(
+      'name' => t('Bullet list'),
+    ),
+    'ol' => array(
+      'name' => t('Numeric list'),
     ),
     '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, "") }'),
+    ),
+    'quotes' => array(
+      'name' => t('Quotes'),
+    ),
+    'code' => array(
+      'name' => t('Code Block / Code'),
+    ),
+    'kbd' => array(
+      'name' => t('Keyboard Input'),
+    ),
+    '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];
+          $settings['buttons'][_wysiwyg_markitup_group($button)][$button] = $default_buttons[$button];
         }
       }
     }
   }
-
-  return $settings;
+ return $settings;
 }
 
 /**
@@ -192,11 +213,23 @@ function wysiwyg_markitup_plugins($editor) {
   return array(
     'default' => array(
       'buttons' => array(
-        'bold' => t('Bold'), 'italic' => t('Italic'),
+        'h1' => t('Heading 1'),
+        'h2' => t('Heading 2'),
+        'h3' => t('Heading 3'),
+        'h4' => t('Heading 4'),
+        'h5' => t('Heading 5'),
+        'h6' => t('Heading 6'),
+        'bold' => t('Bold'),
+        'italic' => t('Italic'),
         'stroke' => t('Strike-through'),
+        'ul' => t('Bullet list'),
+        'ol' => t('Numeric list'),
         'link' => t('Link'),
         'image' => t('Image'),
-        // 'cleanup' => t('Clean-up'),
+        'quotes' => t('Block quote / Inline quote'),
+        'code' => t('Code Block / Code'),
+        'kbd' => t('Keyboard input'),
+        'cleanup' => t('Clean-up'),
         'preview' => t('Preview'),
       ),
       'internal' => TRUE,
@@ -204,3 +237,46 @@ function wysiwyg_markitup_plugins($editor) {
   );
 }
 
+/**
+ * Define grouping for ckEditor buttons.
+ */
+function _wysiwyg_markitup_group($button) {
+  switch ($button) {
+    case 'h1':
+    case 'h2':
+    case 'h3':
+    case 'h4':
+    case 'h5':
+    case 'h6':
+      $group = 'heading';
+      break;
+
+    case 'bold':
+    case 'italic':
+    case 'stroke':
+      $group = 'basicstyles';
+      break;
+
+    case 'ol':
+    case 'ul':
+      $group = 'paragraph';
+      break;
+
+    case 'link':
+    case 'image':
+      $group = 'insert';
+      break;
+
+    case 'quotes':
+    case 'code':
+    case 'kbd':
+      $group = 'tools';
+      break;
+
+    default:
+      $group = 'other';
+      break;
+  }
+
+  return $group;
+}
