Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Customizing the Redactor Editor in #concrete5
  1. Make application/src/Editor/RedactorEditor.php
  2. Override editor binding from application/bootstrap/app.php
<?php
Core::bindShared('editor', function() {
return new \Application\Src\Editor\RedactorEditor();
});
<?php
namespace Application\Src\Editor;
class RedactorEditor extends \Concrete\Core\Editor\RedactorEditor
{
protected function getEditor($key, $content = null, $options = array())
{
// Stop converting divs to paragraphs
$options['replaceDivs'] = false;
return parent::getEditor($key, $content, $options);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.