Supercharged textarea with markdown preview for Silverstripe CMS
PHP JavaScript Scheme CSS
Latest commit cd9f7d7 Jul 15, 2016 @robbieaverill Revert "Remove CMS dependency"
This reverts commit 8248b6d.

Markdown capable TextareaField for Silverstripe CMS

Packagist Packagist Code quality via Scrutinizer CI Build Status


  • Live preview (toggle)
  • Extendable toolbar with common markdown functions
  • Support for both regular markdown and extra functions


Markdown editor screenshot

Credits and Authors



  • Use composer to install composer require robbieaverill/silverstripe-markdowntextareafield:*
  • Run /dev/build?flush=1


You can use the MarkdownText data type for regular markdown or MarkdownTextExtra for added syntax features:

class Page extends SiteTree {

    private static $db = array(
        'MarkdownContent' => 'MarkdownTextExtra',

    public function getCMSFields() {
        $fields = parent::getCMSFields();

        $markdownfield = MarkdownTextareaField::create('MarkdownContent');
        $markdownfield->enableExtra(); // Enables extra syntax support for fields live preview.

        $fields->addFieldToTab('Root.Main', $markdownfield);        
        return $fields;


It is also possible to override/use markdown syntax in templates:

<div class="content">
    $MarkdownContent    <!-- Depending on data type used -->

<div class="content">
    $MarkdownContent.MarkdownAsHTML    <!-- Works with both data types, regular markdown -->

<div class="content">
    $MarkdownContent.MarkdownExtraAsHTML    <!-- Works with both data types, extended syntax -->

<div class="content">
        // Render JSON content
        // or


  • Bug reports and ideas more than welcome.