- Make application/src/Editor/RedactorEditor.php
- Override editor binding from application/bootstrap/app.php
Customizing the Redactor Editor in #concrete5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Core::bindShared('editor', function() { | |
return new \Application\Src\Editor\RedactorEditor(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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