[FOLLOWUP][TASK] Fluidification of Opendocs Toolbar
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / ext_tables.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Add Abbreviation records
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
6 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_rtehtmlarea_acronym', 'EXT:rtehtmlarea/Resources/Private/Language/locallang_csh_abbreviation.xlf');
7
8 // Add contextual help files
9 $htmlAreaRteContextHelpFiles = [
10 'General' => 'EXT:rtehtmlarea/Resources/Private/Language/locallang_csh.xlf',
11 'Abbreviation' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/Abbreviation/locallang_csh.xlf',
12 'EditElement' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/EditElement/locallang_csh.xlf',
13 'Language' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/Language/locallang_csh.xlf',
14 'MicrodataSchema' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/MicrodataSchema/locallang_csh.xlf',
15 'PlainText' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/PlainText/locallang_csh.xlf',
16 'RemoveFormat' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/RemoveFormat/locallang_csh.xlf',
17 'TableOperations' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/TableOperations/locallang_csh.xlf'
18 ];
19 foreach ($htmlAreaRteContextHelpFiles as $key => $file) {
20 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xEXT_rtehtmlarea_' . $key, $file);
21 }
22 unset($htmlAreaRteContextHelpFiles);
23
24 if (TYPO3_MODE === 'BE') {
25 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['RteImageSelector']['hooks']['editImageHandler'] = [
26 'handler' => \TYPO3\CMS\Rtehtmlarea\ImageHandler\EditImageHandler::class
27 ];
28 }
29
30 // Extend TYPO3 User Settings Configuration
31 if (TYPO3_MODE === 'BE' && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('setup') && is_array($GLOBALS['TYPO3_USER_SETTINGS'])) {
32 $GLOBALS['TYPO3_USER_SETTINGS']['columns'] = array_merge($GLOBALS['TYPO3_USER_SETTINGS']['columns'], [
33 'rteWidth' => [
34 'type' => 'text',
35 'label' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang.xlf:rteWidth',
36 'csh' => 'xEXT_rtehtmlarea_General:rteWidth'
37 ],
38 'rteHeight' => [
39 'type' => 'text',
40 'label' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang.xlf:rteHeight',
41 'csh' => 'xEXT_rtehtmlarea_General:rteHeight'
42 ],
43 'rteResize' => [
44 'type' => 'check',
45 'label' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang.xlf:rteResize',
46 'csh' => 'xEXT_rtehtmlarea_General:rteResize'
47 ],
48 'rteMaxHeight' => [
49 'type' => 'text',
50 'label' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang.xlf:rteMaxHeight',
51 'csh' => 'xEXT_rtehtmlarea_General:rteMaxHeight'
52 ],
53 'rteCleanPasteBehaviour' => [
54 'type' => 'select',
55 'renderType' => 'selectSingle',
56 'label' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/Plugins/PlainText/locallang_js.xlf:rteCleanPasteBehaviour',
57 'items' => [
58 'plainText' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/Plugins/PlainText/locallang_js.xlf:plainText',
59 'pasteStructure' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/Plugins/PlainText/locallang_js.xlf:pasteStructure',
60 'pasteFormat' => 'LLL:EXT:rtehtmlarea/Resources/Private/Language/Plugins/PlainText/locallang_js.xlf:pasteFormat'
61 ],
62 'csh' => 'xEXT_rtehtmlarea_PlainText:behaviour'
63 ]
64 ]);
65
66 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToUserSettings(
67 '--div--;LLL:EXT:rtehtmlarea/Resources/Private/Language/locallang.xlf:rteSettings,rteWidth,rteHeight,rteResize,rteMaxHeight,rteCleanPasteBehaviour'
68 );
69 }