Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
HtmlEditorConfig for SilverStripe Foundation Theme. Also sets up a minimal, single line toolbar.
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
Something went wrong with that request. Please try again.