Use a rich editor form widget as the Winter.Blog post editor
2
Use the following Event listener to force the Winter.Blog plugin to always use a richeditor
form widget.
Event::listen('backend.form.extendFields', function($widget) {
// Extend only the Blog\Posts controller & Extend only Blog\Post model
if (!($widget->getController() instanceof \Winter\Blog\Controllers\Posts
&& $widget->model instanceof \Winter\Blog\Models\Post)
){
return;
}
$field = $widget->getField('content');
if (class_exists('Winter\Translate\FormWidgets\MLRichEditor')) {
$field->config['widget'] = 'Winter\Translate\FormWidgets\MLRichEditor';
} else {
$field->config['widget'] = 'Backend\FormWidgets\RichEditor';
}
});
It worked like magic!!! ***** Searching for the solution from the very first day...