[BUGFIX] Skip CKEditor registration on CLI
[Packages/TYPO3.CMS.git] / typo3 / sysext / rte_ckeditor / ext_localconf.php
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_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) === 0) {
12 \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
13 \TYPO3\CMS\Core\Page\PageRenderer::class
14 )->addRequireJsConfiguration([
15 'shim' => [
16 'ckeditor' => ['exports' => 'CKEDITOR']
17 ],
18 'paths' => [
19 'ckeditor' => \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath(
20 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('rte_ckeditor', 'Resources/Public/JavaScript/Contrib/')
21 ) . 'ckeditor'
22 ]
23 ]);
24 }
25
26 // Register the presets
27 $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml';
28 $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'] = 'EXT:rte_ckeditor/Configuration/RTE/Minimal.yaml';
29 $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'] = 'EXT:rte_ckeditor/Configuration/RTE/Full.yaml';