$fieldConfig) { if (empty($fieldConfig['config']['type']) || $fieldConfig['config']['type'] !== 'text') { continue; } // Check if richtext is enabled for the field if ($fieldConfig['config']['enableRichtext'] ?? false) { $richtextConfiguration = $this->richtext->getConfiguration( $result['tableName'], $fieldName, $result['effectivePid'], (string)$result['recordTypeValue'], $fieldConfig['config'] ); // Transform if richtext is not disabled in configuration if (!($richtextConfiguration['disabled'] ?? false)) { // remember RTE preset name $result['processedTca']['columns'][$fieldName]['config']['richtextConfigurationName'] = $fieldConfig['config']['richtextConfiguration'] ?? ''; // Add final resolved configuration to TCA array $result['processedTca']['columns'][$fieldName]['config']['richtextConfiguration'] = $richtextConfiguration; // If eval=null is set for field, value might be null ... don't transform anything in this case. if ($result['databaseRow'][$fieldName] !== null) { // Process "from-db-to-rte" on current value $result['databaseRow'][$fieldName] = $this->rteHtmlParser->transformTextForRichTextEditor($result['databaseRow'][$fieldName], $richtextConfiguration['proc.'] ?? []); } } } } return $result; } }