28 lines
1.1 KiB
PHP
28 lines
1.1 KiB
PHP
<?php
|
|
defined('TYPO3_MODE') or die();
|
|
|
|
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/file_edit.php']['preOutputProcessingHook'][] = \TYPO3\CMS\T3editor\Hook\FileEditHook::class . '->preOutputProcessingHook';
|
|
|
|
if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE) {
|
|
// We need this at a central place because CodeMirror uses relative paths in its module definitions and using PageRenderer is prohibited in FormEngine
|
|
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
|
|
\TYPO3\CMS\Core\Page\PageRenderer::class
|
|
)->addRequireJsConfiguration([
|
|
'packages' => [
|
|
[
|
|
'name' => 'cm',
|
|
'location' => \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath(
|
|
\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:t3editor/Resources/Public/JavaScript/Contrib/cm')
|
|
),
|
|
'main' => 'lib/codemirror',
|
|
],
|
|
],
|
|
]);
|
|
}
|
|
|
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1433089350] = [
|
|
'nodeName' => 't3editor',
|
|
'priority' => 40,
|
|
'class' => \TYPO3\CMS\T3editor\Form\Element\T3editorElement::class,
|
|
];
|