Contao Open Source CMS > Understand > Developer's guide > Customizing Contao > How to customize the Rich Text Editor

How to customize the Rich Text Editor

This page explains how to customize the Rich Text Editor and save the changes so they will not be overriden on the next Contao update. Note that Contao does not include all TinyMCE plugins by default, so if you want to use a certain plugin that is not part of the Contao distribution, download it from the TinyMCE project website and move it into the plugins/tinyMCE/plugins folder.

Rich Text Editor configuration

To image above shows the default Rich Text Editor configuration file system/config/tinyMCE.php. To create a custom configuration file, simply copy it and rename it e.g. to tinyCustom.php. Then apply your changes and save the new file. The last step is to adjust the data container configuration in the system/config/dcaconfig.php file and tell Contao to which fields the custom file shall be applied.

// Use the custom RTE configuration for text elements
$GLOBALS['TL_DCA']['tl_content']['fields']['text']['eval']['rte'] = 'tinyCustom';

Add a comment

Comment by Marcin Stępień |

nice article ! thx