File tree Expand file tree Collapse file tree 4 files changed +68
-0
lines changed
ApiOverview/Events/Events/Core/Configuration
_AfterRichtextConfigurationPreparedEvent Expand file tree Collapse file tree 4 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ .. include :: /Includes.rst.txt
2+ .. index :: Events; AfterRichtextConfigurationPreparedEvent
3+
4+ .. _AfterRichtextConfigurationPreparedEvent :
5+
6+ =======================================
7+ AfterRichtextConfigurationPreparedEvent
8+ =======================================
9+
10+ .. versionadded :: 14.0
11+
12+ The PSR-14 event
13+ :php: `\T YPO3\C MS\C ore\C onfiguration\E vent\A fterRichtextConfigurationPreparedEvent `
14+ allows to modify the richtext configuration after it has been fetched and prepared.
15+
16+ .. _AfterRichtextConfigurationPreparedEvent-example :
17+
18+ Example: Enable debugging in the rich text editor
19+ =================================================
20+
21+ The following event listener enables debugging in the rich text editor:
22+
23+ .. literalinclude :: _AfterRichtextConfigurationPreparedEvent/_MyEventListener.php
24+ :language: php
25+ :caption: EXT:my_extension/Classes/Configuration/EventListener/EnableDebugRichTextEditorEventListener.php
26+
27+ .. _AfterRichtextConfigurationPreparedEvent-api :
28+
29+ API
30+ ===
31+
32+ .. include :: /CodeSnippets/Events/Core/AfterRichtextConfigurationPreparedEvent.rst.txt
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace MyVendor \MyExtension \Configuration \EventListener ;
6+
7+ use TYPO3 \CMS \Core \Attribute \AsEventListener ;
8+ use TYPO3 \CMS \Core \Configuration \Event \AfterRichtextConfigurationPreparedEvent ;
9+
10+ final class EnableDebugRichTextEditorEventListener
11+ {
12+ #[AsEventListener('my-package/configuration/modify-richtext-configuration ' )]
13+ public function __invoke (AfterRichtextConfigurationPreparedEvent $ event ): void
14+ {
15+ $ config = $ event ->getConfiguration ();
16+ $ config ['editor ' ]['config ' ]['debug ' ] = true ;
17+ $ event ->setConfiguration ($ config );
18+ }
19+ }
Original file line number Diff line number Diff line change 338338 'targetFileName ' => 'CodeSnippets/Events/Core/RecordCreationEvent.rst.txt ' ,
339339 'withCode ' => false ,
340340 ],
341+ [
342+ 'action ' => 'createPhpClassDocs ' ,
343+ 'class ' => \TYPO3 \CMS \Core \Configuration \Event \AfterRichtextConfigurationPreparedEvent::class,
344+ 'targetFileName ' => 'CodeSnippets/Events/Core/AfterRichtextConfigurationPreparedEvent.rst.txt ' ,
345+ 'withCode ' => false ,
346+ ],
341347];
Original file line number Diff line number Diff line change 1+ .. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets
2+ .. php :namespace :: TYPO3\CMS\Core\Configuration\Event
3+
4+ .. php :class :: AfterRichtextConfigurationPreparedEvent
5+
6+ .. php :method :: getConfiguration()
7+ :returns: `array `
8+
9+ .. php :method :: setConfiguration(array $configuration)
10+
11+ :param $configuration: the configuration
You can’t perform that action at this time.
0 commit comments