[BUGFIX] RTE: In Chrome RTE inserts weird span tags
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / ext_tables.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Add static template for Click-enlarge rendering
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'static/clickenlarge/', 'Clickenlarge Rendering');
6 // Add configuration of soft references on image tags in RTE content
7 require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'hooks/softref/ext_tables.php';
8
9 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
10 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_rtehtmlarea_acronym', 'EXT:' . $_EXTKEY . '/locallang_csh_abbreviation.xlf');
11 // Add contextual help files
12 $htmlAreaRteContextHelpFiles = array(
13 'General' => 'EXT:' . $_EXTKEY . '/locallang_csh.xlf',
14 'Acronym' => 'EXT:' . $_EXTKEY . '/extensions/Acronym/locallang_csh.xlf',
15 'EditElement' => 'EXT:' . $_EXTKEY . '/extensions/EditElement/locallang_csh.xlf',
16 'Language' => 'EXT:' . $_EXTKEY . '/extensions/Language/locallang_csh.xlf',
17 'MicrodataSchema' => 'EXT:' . $_EXTKEY . '/extensions/MicrodataSchema/locallang_csh.xlf',
18 'PlainText' => 'EXT:' . $_EXTKEY . '/extensions/PlainText/locallang_csh.xlf',
19 'RemoveFormat' => 'EXT:' . $_EXTKEY . '/extensions/RemoveFormat/locallang_csh.xlf',
20 'TableOperations' => 'EXT:' . $_EXTKEY . '/extensions/TableOperations/locallang_csh.xlf'
21 );
22 foreach ($htmlAreaRteContextHelpFiles as $key => $file) {
23 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xEXT_' . $_EXTKEY . '_' . $key, $file);
24 }
25 unset($htmlAreaRteContextHelpFiles);
26 // Extend TYPO3 User Settings Configuration
27 if (TYPO3_MODE === 'BE' && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('setup') && is_array($GLOBALS['TYPO3_USER_SETTINGS'])) {
28 $GLOBALS['TYPO3_USER_SETTINGS']['columns'] = array_merge($GLOBALS['TYPO3_USER_SETTINGS']['columns'], array(
29 'rteWidth' => array(
30 'type' => 'text',
31 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteWidth',
32 'csh' => 'xEXT_rtehtmlarea_General:rteWidth'
33 ),
34 'rteHeight' => array(
35 'type' => 'text',
36 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteHeight',
37 'csh' => 'xEXT_rtehtmlarea_General:rteHeight'
38 ),
39 'rteResize' => array(
40 'type' => 'check',
41 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteResize',
42 'csh' => 'xEXT_rtehtmlarea_General:rteResize'
43 ),
44 'rteMaxHeight' => array(
45 'type' => 'text',
46 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteMaxHeight',
47 'csh' => 'xEXT_rtehtmlarea_General:rteMaxHeight'
48 ),
49 'rteCleanPasteBehaviour' => array(
50 'type' => 'select',
51 'label' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:rteCleanPasteBehaviour',
52 'items' => array(
53 'plainText' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:plainText',
54 'pasteStructure' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:pasteStructure',
55 'pasteFormat' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:pasteFormat'
56 ),
57 'csh' => 'xEXT_rtehtmlarea_PlainText:behaviour'
58 )
59 ));
60 $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',--div--;LLL:EXT:rtehtmlarea/locallang.xlf:rteSettings,rteWidth,rteHeight,rteResize,rteMaxHeight,rteCleanPasteBehaviour';
61 }
62 if (TYPO3_MODE === 'BE') {
63 // Register RTE element browser wizard
64 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
65 'rtehtmlarea_wizard_element_browser',
66 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod3/'
67 );
68
69 // Register RTE wizard_select_image
70 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
71 'rtehtmlarea_wizard_select_image',
72 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod4/'
73 );
74
75 // Register RTE wizard_user
76 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
77 'rtehtmlarea_wizard_user',
78 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod5/'
79 );
80
81 // Register RTE wizard_user
82 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
83 'rtehtmlarea_wizard_parse_html',
84 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'mod6/'
85 );
86 }