silverstripe / silverstripe-contentreview

Mark a page in Silverstripe CMS with a date and an owner for future review
http://www.silverstripe.org/content-review-module/
BSD 3-Clause "New" or "Revised" License
22 stars 36 forks source link

Replace email notification textarea with WYSIWYG editor #159

Open emteknetnz opened 2 years ago

emteknetnz commented 2 years ago

ACs

emteknetnz commented 2 years ago

You can easily swap out the editor by updating ContentReviewDefaultSettings::updateCMSFields() - change ReviewBody from a TextAreaField to an HTMLEditorField

You can updated the config for the HTMLEditorField via setEditorConfig()

See TinyMCEConfig for the default settings. To create your own config:

$config = clone HTMLEditorConfig::get('cms');
$config->setOption('formats', $formats);
HTMLEditorConfig::set_config('contentreviewemail', $config);
// ...
HTMLEditorField::create('Field','Title')->setEditorConfig('contentreviewemail');

You'll need to remove the buttons via an updated js file (editor.js? tinymce.js?) rather than in PHP. I'm not sure of the best way to do this.

mariabelobrol commented 2 years ago