Last active
December 21, 2015 04:39
-
-
Save ryanwachtl/6251297 to your computer and use it in GitHub Desktop.
HtmlEditorConfig for SilverStripe Foundation Theme. Also sets up a minimal, single line toolbar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HtmlEditorConfig::get('cms')->setOptions(array( | |
"skin" => "default", | |
"style_formats" => array( | |
array( | |
"title" => "Lead", | |
"selector" => "p", | |
"classes" => "lead" | |
), | |
array( | |
"title" => "Subheader", | |
"selector" => "h1, h2, h3, h4, h5, h6, p", | |
"classes" => "subheader" | |
), | |
array( | |
"title" => "Small", | |
"inline" => "small" | |
), | |
array( | |
"title" => "Label", | |
"inline" => "span", | |
"classes" => "label" | |
), | |
array( | |
"title" => "Label - Secondary", | |
"inline" => "span", | |
"classes" => "label secondary" | |
), | |
array( | |
"title" => "Button", | |
"selector" => "a", | |
"classes" => "button small" | |
), | |
array( | |
"title" => "Thumbnail", | |
"selector" => "a", | |
"classes" => "th radius" | |
), | |
array( | |
"title" => "List - No Bullets", | |
"selector" => "ul", | |
"classes" => "no-bullet" | |
), | |
array( | |
"title" => "List - Disc", | |
"selector" => "ul", | |
"classes" => "disc" | |
), | |
array( | |
"title" => "List - Circle", | |
"selector" => "ul", | |
"classes" => "circle" | |
), | |
array( | |
"title" => "List - Square", | |
"selector" => "ul", | |
"classes" => "square" | |
), | |
array( | |
"title" => "Inline List", | |
"selector" => "ul", | |
"classes" => "inline-list" | |
), | |
array( | |
"title" => "Panel", | |
"inline" => "div", | |
"classes" => "panel" | |
), | |
array( | |
"title" => "Panel - Callout", | |
"inline" => "div", | |
"classes" => "panel callout" | |
) | |
) | |
)); | |
HtmlEditorConfig::get('cms')->setButtonsForLine(1, array()); | |
HtmlEditorConfig::get('cms')->setButtonsForLine(2, array()); | |
HtmlEditorConfig::get('cms')->setButtonsForLine(3, array()); | |
HtmlEditorConfig::get('cms')->setButtonsForLine(1, 'pastetext', 'styleselect', 'formatselect', 'bold', 'italic', 'underline', 'strikethrough', 'separator', 'justifyleft', 'justifyright', 'justifycenter', 'justifyfull', 'separator', 'bullist', 'numlist', 'separator', 'image', 'link', 'unlink', 'anchor', 'separator', 'charmap', 'code', 'fullscreen'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment