forked from FriendsOfTYPO3/rtehtmlarea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
218 lines (175 loc) · 11.4 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?php
defined('TYPO3_MODE') or die();
// Register FormEngine node type resolver hook to render RTE in FormEngine if enabled
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeResolver'][1433167475] = [
'nodeName' => 'text',
'priority' => 40,
'class' => \TYPO3\CMS\Rtehtmlarea\Form\Resolver\RichTextNodeResolver::class,
];
// Register renderType "fullScreenRichtext" for the full screen button control
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1484760191] = [
'nodeName' => 'fullScreenRichtext',
'priority' => 30,
'class' => \TYPO3\CMS\Rtehtmlarea\Form\FieldControl\FullScreenRichtext::class,
];
// Unserializing the configuration so we can use it here
$_EXTCONF = unserialize($_EXTCONF, ['allowed_classes' => false]);
// Add default RTE transformation configuration
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/PageTSconfig/Proc/pageTSConfig.txt">');
// Add default Page TS Config RTE configuration
if (strpos($_EXTCONF['defaultConfiguration'], 'Minimal') !== false) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['defaultConfiguration'] = 'Advanced';
} elseif (strpos($_EXTCONF['defaultConfiguration'], 'Demo') !== false) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['defaultConfiguration'] = 'Demo';
// Add default User TS Config RTE configuration
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/UserTSconfig/Demo.txt">');
} else {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['defaultConfiguration'] = 'Typical';
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/PageTSconfig/' . $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['defaultConfiguration'] . '/pageTSConfig.txt">');
// Registering soft reference parser for image tags in RTE content
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser']['rtehtmlarea_images'] = \TYPO3\CMS\Rtehtmlarea\Hook\SoftReferenceHook::class;
// Add Status Report about Conflicting Extensions
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['htmlArea RTE'][] = \TYPO3\CMS\Rtehtmlarea\Hook\StatusReportConflictsCheckHook::class;
// Set warning in the Update Wizard of the Install Tool for deprecated Page TS Config properties
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['checkForDeprecatedRtePageTSConfigProperties'] = \TYPO3\CMS\Rtehtmlarea\Hook\Install\DeprecatedRteProperties::class;
// Set warning in the Update Wizard of the Install Tool for replacement of "acronym" button by "abbreviation" button
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['checkForRteAcronymButtonRenamedToAbbreviation'] = \TYPO3\CMS\Rtehtmlarea\Hook\Install\RteAcronymButtonRenamedToAbbreviation::class;
// Initialize plugin registration array
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins'] = [];
// Editor Mode configuration
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['EditorMode'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\EditorMode::class
];
// General Element configuration
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['EditElement'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\EditElement::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['MicrodataSchema'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\MicroDataSchema::class
];
// Inline Elements configuration
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['DefaultInline'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\DefaultInline::class
];
if ($_EXTCONF['enableInlineElements']) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['InlineElements'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\InlineElements::class
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/PageTSconfig/Extensions/InlineElements/pageTSConfig.txt">');
}
// Block Elements configuration
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['BlockElements'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\BlockElements::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['DefinitionList'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\DefinitionList::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['BlockStyle'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\BlockStyle::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['CharacterMap'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\CharacterMap::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['Abbreviation'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Abbreviation::class,
'disableInFE' => true
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['UserElements'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\UserElements::class,
'disableInFE' => true
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TextStyle'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\TextStyle::class
];
// Enable images and add default Page TS Config RTE configuration for enabling images with the Minimal and Typical default configuration
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['enableImages'] = isset($_EXTCONF['enableImages']) && $_EXTCONF['enableImages'];
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['defaultConfiguration'] === 'Demo') {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['enableImages'] = true;
}
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['enableImages']) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['DefaultImage'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\DefaultImage::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Image'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Typo3Image::class,
'disableInFE' => true
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/PageTSconfig/Image/pageTSConfig.txt">');
}
// Add frontend image rendering TypoScript anyways
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('rtehtmlarea', 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/TypoScript/ImageRendering/setup.txt">', 'defaultContentRendering');
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['DefaultLink'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\DefaultLink::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Link'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Typo3Link::class,
'disableInFE' => true,
'additionalAttributes' => 'rel'
];
// Add default Page TS Config RTE configuration for enabling links accessibility icons
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['enableAccessibilityIcons'] = isset($_EXTCONF['enableAccessibilityIcons']) && $_EXTCONF['enableAccessibilityIcons'];
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['enableAccessibilityIcons']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/PageTSconfig/AccessibilityIcons/pageTSConfig.txt">');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('rtehtmlarea', 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/TypoScript/AccessibilityIcons/setup.txt">', 'defaultContentRendering');
}
// Register features that use the style attribute
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['allowStyleAttribute'] = isset($_EXTCONF['allowStyleAttribute']) && $_EXTCONF['allowStyleAttribute'];
if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['allowStyleAttribute']) {
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3Color'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Typo3Color::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['SelectFont'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\SelectFont::class
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rtehtmlarea/Configuration/PageTSconfig/Style/pageTSConfig.txt">');
}
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TextIndicator'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\TextIndicator::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['InsertSmiley'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\InsertSmiley::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['Language'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Language::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['SpellChecker'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Spellchecker::class,
'AspellDirectory' => $_EXTCONF['AspellDirectory'] ?: '/usr/bin/aspell',
'noSpellCheckLanguages' => $_EXTCONF['noSpellCheckLanguages'] ?: 'ja,km,ko,lo,th,zh,b5,gb',
'forceCommandMode' => $_EXTCONF['forceCommandMode'] ?: false
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['FindReplace'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\FindReplace::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['RemoveFormat'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\RemoveFormat::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['PlainText'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Plaintext::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['DefaultClean'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\DefaultClean::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TYPO3HtmlParser'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\Typo3HtmlParser::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['QuickTag'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\QuickTag::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['TableOperations'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\TableOperations::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['AboutEditor'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\AboutEditor::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['ContextMenu'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\ContextMenu::class
];
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['UndoRedo'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\UndoRedo::class
];
// Copy & Paste configuration
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['CopyPaste'] = [
'objectReference' => \TYPO3\CMS\Rtehtmlarea\Extension\CopyPaste::class
];