Use a rich editor form widget as the Rainlab.Blog post editor
7
Use the following Event listener to force the RainLab.Blog plugin to always use a richeditor
form widget.
Event::listen('backend.form.extendFieldsBefore', function($widget) {
// Extend only the Blog\Posts controller & Extend only Blog\Post model
if (!($widget->getController() instanceof \RainLab\Blog\Controllers\Posts
&& $widget->model instanceof \RainLab\Blog\Models\Post)
){
return;
}
$widget->secondaryTabs['fields']['content']['type'] = 'richeditor';
});
To use the current editor in OctoberCMS v2.0, specify the backend class