Project

General

Profile

Task #81882

Updated by Hannes Lau over 7 years ago

 
 For the RTE editor configuration, allow to override presets chosen via TSconfig 

 In my use case, I would like to 
 * Use field specific RTE configurations for custom content elements 
 * For all RTEs: Allow admin users to switch to HTML mode 

 This is my PageTSConfig: 
 <pre> 
 # Select preset for bodytext of custom CType textmedia_textmedia 
 RTE.config.tt_content.bodytext.types.textmedia_textmedia.preset = textmedia 

 # Display the `mode` button for all admin users 
 [adminUser = 1] 
   RTE.editor.config.toolbarGroups.99 { 
     name = mode 
     groups.1 = mode 
   } 
 [global] 
 </pre> 

 In @typo3/sysext/core/Classes/Configuration/Richtext.php:106@ there is a comment 
 <pre> 
 // Reload the base configuration, if overridden via PageTS "RTE.default.preset = Minimal" for instance 
 // However, if a preset is chosen via TSconfig, then it is not possible to override anything else again 
 </pre> 


 PageTSConfig for testing 
 <pre> 
 # Select preset for bodytext of custom CType textmedia_textmedia 
 RTE.config.tt_content.bodytext.types.text.preset = minimal 

 # Display the `mode` button for all admin users 
 [adminUser = 1] 
   RTE.editor.config.width = 200 
 [global] 
 </pre>

Back