TYPO3 CMS  TYPO3_8-7
ext_localconf.php
Go to the documentation of this file.
1 <?php
2 defined('TYPO3_MODE') or die();
3 
4 // Register FormEngine node type resolver hook to render RTE in FormEngine if enabled
5 $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeResolver'][1480314091] = [
6  'nodeName' => 'text',
7  'priority' => 50,
8  'class' => \TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver::class,
9 ];
10 
11 if (TYPO3_MODE === 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
12  if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rte_ckeditor'])) {
13  $extensionConfiguration = unserialize(
14  $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['rte_ckeditor'],
15  ['allowed_classes' => false]
16  );
17  }
18 
19  switch ($extensionConfiguration['ckeditorVersion'] ?? 'latest') {
20  case '4.7':
21  $ckeditorFolder = 'Resources/Public/JavaScript/Contrib-47/';
22  break;
23  case 'latest':
24  default:
25  $ckeditorFolder = 'Resources/Public/JavaScript/Contrib/';
26  break;
27  }
28 
30  \TYPO3\CMS\Core\Page\PageRenderer::class
31  )->addRequireJsConfiguration([
32  'shim' => [
33  'ckeditor' => ['exports' => 'CKEDITOR']
34  ],
35  'paths' => [
36  'ckeditor' => \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath(
37  \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('rte_ckeditor', $ckeditorFolder)
38  ) . 'ckeditor'
39  ]
40  ]);
41 }
42 
43 // Register the presets
44 if (empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'])) {
45  $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml';
46 }
47 if (empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'])) {
48  $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'] = 'EXT:rte_ckeditor/Configuration/RTE/Minimal.yaml';
49 }
50 if (empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'])) {
51  $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'] = 'EXT:rte_ckeditor/Configuration/RTE/Full.yaml';
52 }
static makeInstance($className,... $constructorArguments)
if(TYPO3_MODE==='BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']