Create event handlers to load ckeditor or simplemde

parent b1f87931
<?php
namespace Modules\Core\Events\Handlers;
use Modules\Core\Events\EditorIsRendering;
class LoadCkEditor
{
public function handle(EditorIsRendering $editor)
{
$editor->addJs('ckeditor.js');
$editor->setEditorClass('ckeditor');
return false;
}
}
<?php
namespace Modules\Core\Events\Handlers;
use Modules\Core\Events\EditorIsRendering;
class LoadSimpleMde
{
public function handle(EditorIsRendering $editor)
{
$editor->addJs('simplemde.js')->addCss('simplemde.css');
$editor->setEditorClass('simplemde');
$editor->setEditorJsPartial('core::partials.simplemde');
return false;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment