Skip to content

Instantly share code, notes, and snippets.

Last active January 14, 2017 23:19
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
Core::bindShared('editor', function() {
return new \Application\Src\Editor\RedactorEditor();
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