src/Contao/View/Contao2BackendView/Subscriber/RichTextFileUuidSubscriber.php
public function convertUuidToFileSource(DecodePropertyValueForWidgetEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        $propertiesDefinition = $event->getEnvironment()->getDataDefinition()->getPropertiesDefinition();
        $property             = $propertiesDefinition->getProperty($event->getProperty());


        if (!\array_key_exists('rte', $property->getExtra())
            || \strpos($property->getExtra()['rte'], 'tiny') !== 0
        ) {
            return;
        }

        $event->setValue(
            StringUtil::insertTagToSrc($event->getValue())
        );
    }
public function convertUuidToFileSource(DecodePropertyValueForWidgetEvent $event)
    {
        if (!$this->scopeDeterminator->currentScopeIsBackend()) {
            return;
        }

        $propertiesDefinition = $event->getEnvironment()->getDataDefinition()->getPropertiesDefinition();
        $property             = $propertiesDefinition->getProperty($event->getProperty());


        if (!\array_key_exists('rte', $property->getExtra())
            || \strpos($property->getExtra()['rte'], 'tiny') !== 0
        ) {
            return;
        }

        $event->setValue(
            StringUtil::insertTagToSrc($event->getValue())
        );
    }
public function convertUuidToFileSource ( DecodePropertyValueForWidgetEvent $ event ) { if ( ! $ this -> scopeDeterminator -> currentScopeIsBackend ( ) ) { return ; } $ propertiesDefinition = $ event -> getEnvironment ( ) -> getDataDefinition ( ) -> getPropertiesDefinition ( ) ; $ property = $ propertiesDefinition -> getProperty ( $ event -> getProperty ( ) ) ; if ( ! \ array_key_exists ( 'rte' , $ property -> getExtra ( ) ) || \ strpos ( $ property -> getExtra ( ) [ 'rte' ] , 'tiny' ) !== 0 ) { return ; } $ event -> setValue ( StringUtil :: insertTagToSrc ( $ event -> getValue ( ) ) ) ; }
Convert uuid to file source to see the right source in the rich text editor.
After convert this back to the original source.

@param DecodePropertyValueForWidgetEvent $event The event to handle.

@return void
Convert uuid to file source to see the right source in the rich text editor . After convert this back to the original source .