Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

timonreinhard/silverstripe-htmlfield-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HtmlField Module

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

Requirements

  • 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:

<?php
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'));
        $html_editor->setRows(20);
        
        return $fields;
    }

}

Known Limitations

  • This field can not be used in frontend forms.

About

[abandoned] A CodeMirror-powered HTML field for Silverstripe CMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published