Removed custom tinymce helper
Was not required because SilverStripe can allow the developer to set their own `TinyMCEConfig::class` with any endpoint they see fit e.g. DataExtensions . This helps negate overriding configs on existing projects and means we do not need to force custom tinymce configs.
This commit is contained in:
parent
55ecf5504c
commit
47ed60c657
|
@ -165,7 +165,7 @@ class ContentReviewDefaultSettings extends DataExtension
|
|||
TextField::create('ReviewFrom', _t(__CLASS__ . '.EMAILFROM', 'From email address'))
|
||||
->setDescription(_t(__CLASS__ . '.EMAILFROM_RIGHTTITLE', 'e.g: do-not-reply@site.com')),
|
||||
TextField::create('ReviewSubject', _t(__CLASS__ . '.EMAILSUBJECT', 'Subject line')),
|
||||
$wysiwygConfig = HTMLEditorField::create(
|
||||
HTMLEditorField::create(
|
||||
'ReviewBody',
|
||||
_t(__CLASS__ . '.EMAILTEMPLATE', 'Email template')
|
||||
),
|
||||
|
@ -175,41 +175,6 @@ class ContentReviewDefaultSettings extends DataExtension
|
|||
),
|
||||
]
|
||||
);
|
||||
$wysiwygConfig->setEditorConfig($this->getTinyMCEConfig($wysiwygConfig->getEditorConfig()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the TinyMCEConfig that should be used for the email template preview
|
||||
*
|
||||
* @return TinyMCEConfig
|
||||
*/
|
||||
private function getTinyMCEConfig(
|
||||
TinyMCEConfig $config
|
||||
): TinyMCEConfig {
|
||||
$editorButtonsGroupSeparator = '|';
|
||||
$allowedEditorButtons = [
|
||||
'undo',
|
||||
'redo',
|
||||
$editorButtonsGroupSeparator,
|
||||
'bold',
|
||||
'italic',
|
||||
'underline',
|
||||
$editorButtonsGroupSeparator,
|
||||
'bullist',
|
||||
'numlist',
|
||||
$editorButtonsGroupSeparator,
|
||||
'sslink',
|
||||
$editorButtonsGroupSeparator,
|
||||
'formatselect',
|
||||
$editorButtonsGroupSeparator,
|
||||
'code',
|
||||
];
|
||||
|
||||
$config->setButtonsForLine(1, $allowedEditorButtons);
|
||||
$config->setButtonsForLine(2, []);
|
||||
$config->setButtonsForLine(3, []);
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue