axllent / silverstripe-gfmarkdown
GitHub Flavored Markdown editing & rendering using Parsedown
Package info
github.com/axllent/silverstripe-gfmarkdown
Type:silverstripe-vendormodule
pkg:composer/axllent/silverstripe-gfmarkdown
3.0.0
2026-10-31 05:03 UTC
Requires
- erusev/parsedown: ^1.6
- silverstripe/framework: ^6.0
- silverstripe/vendor-plugin: ^3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-31 05:04:41 UTC
README
This module adds a field and a data type that allows for Markdown editing in the CMS using the Github Flavoured Markdown parser Parsedown to render the html.
It includes the Ace editor for CMS editing.
Requirements
- Silverstripe ^6.0
Installation
composer require axllent/silverstripe-gfmarkdown
Usage
Use the Markdown data type as your fields data type, and the MarkdownEditor field in the CMS for editing.
- Refer to the Markdown editor configuration.
- Refer to the Markdown rendering configuration.
Example:
<?php use Axllent\Gfmarkdown\Forms\MarkdownEditor; class MyPage extends Page { public static $db = [ 'MarkdownContent' => 'Markdown' ]; public function getCMSFields() { $fields = parent::getCMSFields(); // If you want the Ace markdown editor in the CMS $fields->addFieldToTab('Root.Main', MarkdownEditor::create('MarkdownContent') ->setTheme('github') // set theme ->setRows(20) // set number of rows in CMS ->setWrap(false) // disable word wrapping ->setHighlightActiveLine(true) // enable line highlighting ); return $fields; } }
Silverstripe Template:
<div class="content"> <!-- Will show as rendered html --> $MarkdownContent </div>