Skip to content

Commit

Permalink
example code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsekaean committed Oct 15, 2017
1 parent 9c445bf commit 4fe86c9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ To use the markdown DB field in your data objects the basic code would look like

```
class MyDataClass extends DataObject {
class MyDataClass extends DataObject
{
private static $db = array(
'MarkdownContent' => '\SilverStripers\markdown\db\MarkdownText'
Expand All @@ -37,15 +38,15 @@ MarkdownText knows to add a markdown editor for your fields, but if you need to

```
public function getCMSFields()
{
$fields = parent::getCMSFields();
{
$fields = parent::getCMSFields();
$fields->addFieldsToTab('Root.Sidebar', array(
\SilverStripers\markdown\forms\MarkdownEditorField::create('MarkdownContent', 'Content'),
));
$fields->addFieldsToTab('Root.Sidebar', array(
\SilverStripers\markdown\forms\MarkdownEditorField::create('MarkdownContent', 'Content'),
));
return $fields;
}
return $fields;
}
```

There is an option to completely replace the HTMLText fields from a CMS by using the following config
Expand Down

0 comments on commit 4fe86c9

Please sign in to comment.