BEdita comes with two bundled rich text editors. CKEditor the default and TinyMCE.
Sometimes you could need to customize the rich text editor for example to simplify toolbar, add buttons, etc... or maybe you would use TinyMCE instead of CKEditor.
Do that in BEdita is quite simple, you have to change a configuration var in bedita.cfg.php
file and eventually write your own rich text configuration.
File system structure
Rich text editors are located under bedita-app/webroot/js/libs/richtexteditors
folder
webroot | |--js | |--libs | |--richtexteditors | |--ckeditor |--tinymce |--conf | |--local
where conf
folder contains default configurations for ckeditor and tinymce.
Custom configurations for specifics BEdita instances would go in local
folder.
Choose and Configure
In order to choose rich text editor and configuration, the richtexteditor var in bedita.ini.php
$config['richtexteditor'] = array( 'name' => 'ckeditor', 'conf' => 'ckeditor_default_init', );
has to be overridden in bedita.cfg.php
.
conf value is referred to richtexteditor/conf
folder, so for example to use a file named ckeditor_custom_init.js
located in conf/local
folder the configuration var would be
$config['richtexteditor'] = array( 'name' => 'ckeditor', 'conf' => 'local/ckeditor_custom_init', );
To create custom conf you should start from default con file and change what you need.
If you want to use TinyMCE with default configuration:
$config['richtexteditor'] = array( 'name' => 'tinymce', 'conf' => 'tinymce_default_init', );