[BUGFIX] T3editor description loading
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3editor / ext_tables.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5
6 if (TYPO3_MODE === 'BE') {
7 // Register AJAX handlers:
8 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('T3Editor::saveCode', 'TYPO3\\CMS\\T3editor\\T3editor->ajaxSaveCode');
9 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('T3Editor::getPlugins', 'TYPO3\\CMS\\T3editor\\T3editor->getPlugins');
10 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('T3Editor_TSrefLoader::getTypes', 'TYPO3\\CMS\\T3editor\\TypoScriptReferenceLoader->processAjaxRequest');
11 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('T3Editor_TSrefLoader::getDescription', 'TYPO3\\CMS\\T3editor\\TypoScriptReferenceLoader->processAjaxRequest');
12 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('CodeCompletion::loadTemplates', 'TYPO3\\CMS\\T3editor\\CodeCompletion->processAjaxRequest');
13
14 // Add the t3editor wizard on the bodytext field of tt_content
15 $TCA['tt_content']['columns']['bodytext']['config']['wizards']['t3editor'] = array(
16 'enableByTypeConfig' => 1,
17 'type' => 'userFunc',
18 'userFunc' => 'TYPO3\\CMS\\T3editor\\FormWizard->main',
19 'title' => 't3editor',
20 'icon' => 'wizard_table.gif',
21 'module' => array(
22 'name' => 'wizard_table'
23 ),
24 'params' => array(
25 'format' => 'html',
26 'style' => 'width:98%; height: 60%;'
27 )
28 );
29
30 // Activate the t3editor only for type html
31 $TCA['tt_content']['types']['html']['showitem'] = str_replace('bodytext,', 'bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.html_formlabel;;nowrap:wizards[t3editor],', $TCA['tt_content']['types']['html']['showitem']);
32 }