Skip to content
A CodeMirror-powered HTML field for Silverstripe CMS
JavaScript PHP
Branch: master
Clone or download
Pull request Compare This branch is even with timonreinhard:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

HtmlField Module

Provides a CodeMirror-powered field for pleasant editing of raw HTML code.


  • SilverStripe 3.0

Project Links

Installation Instructions

  • Put the module into the root folder of your SilverStripe installation.
  • Run /dev/build?flush=all
  • Run /admin/?flush=all

Usage Overview

Example for replacing SilverStripe's built-in TinyMCE editor with CodeMirror:

class HtmlPage extends Page {

    function getCMSFields() {
        $fields = parent::getCMSFields();
        $fields->removeFieldFromTab('Root.Main', 'Content');
        $fields->addFieldToTab('Root.Main', $html_editor = HtmlField::create('Content', 'HTML Content'));
        return $fields;


Known Limitations

  • This field can not be used in frontend forms.
You can’t perform that action at this time.